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

29 lines
1.0 KiB
C#
Raw Permalink Normal View History

2024-10-27 10:53:47 +03: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();
}
}
}