Align managed render graph authoring surface

This commit is contained in:
2026-04-28 03:55:04 +08:00
parent 6b312804eb
commit a7baf16e09
9 changed files with 279 additions and 119 deletions

View File

@@ -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 =>
{