Align managed render graph authoring surface
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Reflection;
|
||||
using XCEngine;
|
||||
using XCEngine.Rendering;
|
||||
using XCEngine.Rendering.RenderGraphModule;
|
||||
using XCEngine.Rendering.Universal;
|
||||
|
||||
namespace ProjectScripts
|
||||
@@ -42,23 +43,27 @@ namespace ProjectScripts
|
||||
RenderPassEvent.BeforeRenderingPostProcessing;
|
||||
}
|
||||
|
||||
protected override bool RecordRenderGraph(
|
||||
ScriptableRenderContext context,
|
||||
RenderingData renderingData)
|
||||
public override void RecordRenderGraph(
|
||||
RenderGraph renderGraph,
|
||||
ContextContainer frameData)
|
||||
{
|
||||
if (context == null ||
|
||||
RenderingData renderingData =
|
||||
frameData != null
|
||||
? frameData.Get<RenderingData>()
|
||||
: null;
|
||||
if (renderGraph == null ||
|
||||
renderingData == null ||
|
||||
!renderingData.isPostProcessStage ||
|
||||
!context.sourceColorTexture.isValid ||
|
||||
!context.primaryColorTarget.isValid)
|
||||
!renderGraph.sourceColorTexture.isValid ||
|
||||
!renderGraph.primaryColorTarget.isValid)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
return context
|
||||
renderGraph
|
||||
.AddRasterPass("Project.PostProcessColorScale")
|
||||
.UseColorSource(context.sourceColorTexture)
|
||||
.SetColorAttachment(context.primaryColorTarget)
|
||||
.UseColorSource(renderGraph.sourceColorTexture)
|
||||
.SetColorAttachment(renderGraph.primaryColorTarget)
|
||||
.SetRenderFunc(
|
||||
rasterContext =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user