Align managed render graph authoring surface
This commit is contained in:
@@ -203,29 +203,31 @@ namespace Gameplay
|
||||
m_passName = passName ?? string.Empty;
|
||||
}
|
||||
|
||||
protected override bool RecordRenderGraph(
|
||||
ScriptableRenderContext context,
|
||||
RenderingData renderingData)
|
||||
public override void RecordRenderGraph(
|
||||
RenderGraph renderGraph,
|
||||
ContextContainer frameData)
|
||||
{
|
||||
return context != null &&
|
||||
renderingData != null &&
|
||||
RecordFullscreen(context);
|
||||
}
|
||||
RenderingData renderingData =
|
||||
frameData != null
|
||||
? frameData.Get<RenderingData>()
|
||||
: null;
|
||||
if (renderGraph == null ||
|
||||
renderingData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
private bool RecordFullscreen(
|
||||
ScriptableRenderContext context)
|
||||
{
|
||||
RenderGraphTextureHandle sourceColor =
|
||||
context.sourceColorTexture;
|
||||
renderGraph.sourceColorTexture;
|
||||
RenderGraphTextureHandle outputColor =
|
||||
context.primaryColorTarget;
|
||||
renderGraph.primaryColorTarget;
|
||||
if (!sourceColor.isValid ||
|
||||
!outputColor.isValid)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
return context
|
||||
renderGraph
|
||||
.AddRasterPass(ResolvePassName())
|
||||
.UseColorSource(sourceColor)
|
||||
.SetColorAttachment(outputColor)
|
||||
@@ -256,27 +258,31 @@ namespace Gameplay
|
||||
m_passName = passName ?? string.Empty;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
RenderGraphTextureHandle sourceColor =
|
||||
context.sourceColorTexture;
|
||||
renderGraph.sourceColorTexture;
|
||||
RenderGraphTextureHandle outputColor =
|
||||
context.primaryColorTarget;
|
||||
renderGraph.primaryColorTarget;
|
||||
if (!sourceColor.isValid ||
|
||||
!outputColor.isValid)
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
return context
|
||||
renderGraph
|
||||
.AddRasterPass(ResolvePassName())
|
||||
.UseColorSource(sourceColor)
|
||||
.SetColorAttachment(outputColor)
|
||||
@@ -2758,12 +2764,18 @@ namespace Gameplay
|
||||
protected override bool RecordStageRenderGraph(
|
||||
ScriptableRenderContext context)
|
||||
{
|
||||
return context != null &&
|
||||
context
|
||||
if (context == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderGraph renderGraph =
|
||||
new RenderGraph(context);
|
||||
return renderGraph
|
||||
.AddRasterPass(
|
||||
"Managed.MainSceneGenericRasterPass")
|
||||
.SetColorAttachment(
|
||||
context.primaryColorTarget)
|
||||
renderGraph.primaryColorTarget)
|
||||
.SetRenderFunc(
|
||||
rasterContext =>
|
||||
{
|
||||
@@ -2807,17 +2819,23 @@ namespace Gameplay
|
||||
protected override bool RecordStageRenderGraph(
|
||||
ScriptableRenderContext context)
|
||||
{
|
||||
if (context == null ||
|
||||
!context.primaryColorTarget.isValid)
|
||||
if (context == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return context
|
||||
RenderGraph renderGraph =
|
||||
new RenderGraph(context);
|
||||
if (!renderGraph.primaryColorTarget.isValid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return renderGraph
|
||||
.AddRasterPass(
|
||||
"Managed.CommandBufferRenderFunc")
|
||||
.SetColorAttachment(
|
||||
context.primaryColorTarget)
|
||||
renderGraph.primaryColorTarget)
|
||||
.SetRenderFunc(
|
||||
rasterContext =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user