forked from BilalY/Rasagar
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|