Rasagar/Library/PackageCache/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipelineRenderGraph.cs

29 lines
1.0 KiB
C#
Raw Normal View History

2024-08-26 13:07:20 -07:00
using System.Collections.Generic;
using UnityEngine.Rendering.RenderGraphModule;
namespace UnityEngine.Rendering.Universal
{
public sealed partial class UniversalRenderPipeline
{
static void RecordRenderGraph(RenderGraph renderGraph, ScriptableRenderContext context, ScriptableRenderer renderer)
{
renderer.RecordRenderGraph(renderGraph, context);
}
static void RecordAndExecuteRenderGraph(RenderGraph renderGraph, ScriptableRenderContext context, ScriptableRenderer renderer, CommandBuffer cmd, Camera camera, string cameraName)
{
RenderGraphParameters rgParams = new RenderGraphParameters
{
executionName = cameraName,
commandBuffer = cmd,
scriptableRenderContext = context,
currentFrameIndex = Time.frameCount,
};
renderGraph.BeginRecording(rgParams);
RecordRenderGraph(renderGraph, context, renderer);
renderGraph.EndRecordingAndExecute();
}
}
}