Align managed render graph authoring surface
This commit is contained in:
@@ -181,37 +181,37 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
internal static bool RecordInternalColorScaleFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
Vector4 colorScale)
|
||||
{
|
||||
RenderGraphTextureHandle sourceColor;
|
||||
RenderGraphTextureHandle outputColor;
|
||||
return TryResolveDefaultFullscreenTargets(
|
||||
context,
|
||||
renderGraph,
|
||||
out sourceColor,
|
||||
out outputColor) &&
|
||||
RecordInternalColorScaleFullscreenPass(
|
||||
context,
|
||||
renderGraph,
|
||||
sourceColor,
|
||||
outputColor,
|
||||
colorScale);
|
||||
}
|
||||
|
||||
internal static bool RecordInternalColorScaleFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
RenderGraphTextureHandle sourceColor,
|
||||
RenderGraphTextureHandle outputColor,
|
||||
Vector4 colorScale,
|
||||
string passName = null)
|
||||
{
|
||||
if (context == null ||
|
||||
if (renderGraph == null ||
|
||||
!outputColor.isValid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderGraphRasterPassBuilder passBuilder =
|
||||
context.AddRasterPass(
|
||||
renderGraph.AddRasterPass(
|
||||
ResolveFullscreenPassName(
|
||||
passName,
|
||||
kColorScaleFullscreenPassName));
|
||||
@@ -227,7 +227,7 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
internal static bool RecordInternalShaderVectorFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
string shaderPath,
|
||||
Vector4 vectorPayload,
|
||||
string passName = null)
|
||||
@@ -242,11 +242,11 @@ namespace XCEngine.Rendering.Universal
|
||||
RenderGraphTextureHandle sourceColor;
|
||||
RenderGraphTextureHandle outputColor;
|
||||
return TryResolveDefaultFullscreenTargets(
|
||||
context,
|
||||
renderGraph,
|
||||
out sourceColor,
|
||||
out outputColor) &&
|
||||
RecordInternalShaderVectorFullscreenPass(
|
||||
context,
|
||||
renderGraph,
|
||||
sourceColor,
|
||||
outputColor,
|
||||
shaderPath,
|
||||
@@ -255,7 +255,7 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
internal static bool RecordInternalShaderVectorFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
RenderGraphTextureHandle sourceColor,
|
||||
RenderGraphTextureHandle outputColor,
|
||||
string shaderPath,
|
||||
@@ -270,14 +270,14 @@ namespace XCEngine.Rendering.Universal
|
||||
nameof(shaderPath));
|
||||
}
|
||||
|
||||
if (context == null ||
|
||||
if (renderGraph == null ||
|
||||
!outputColor.isValid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderGraphRasterPassBuilder passBuilder =
|
||||
context.AddRasterPass(
|
||||
renderGraph.AddRasterPass(
|
||||
ResolveFullscreenPassName(
|
||||
passName,
|
||||
kShaderVectorFullscreenPassName));
|
||||
@@ -296,18 +296,18 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
internal static bool RecordInternalFinalColorFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
FinalColorSettings settings,
|
||||
string passName = null)
|
||||
{
|
||||
RenderGraphTextureHandle sourceColor;
|
||||
RenderGraphTextureHandle outputColor;
|
||||
return TryResolveDefaultFullscreenTargets(
|
||||
context,
|
||||
renderGraph,
|
||||
out sourceColor,
|
||||
out outputColor) &&
|
||||
RecordInternalFinalColorFullscreenPass(
|
||||
context,
|
||||
renderGraph,
|
||||
sourceColor,
|
||||
outputColor,
|
||||
settings,
|
||||
@@ -315,20 +315,20 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
internal static bool RecordInternalFinalColorFullscreenPass(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
RenderGraphTextureHandle sourceColor,
|
||||
RenderGraphTextureHandle outputColor,
|
||||
FinalColorSettings settings,
|
||||
string passName = null)
|
||||
{
|
||||
if (context == null ||
|
||||
if (renderGraph == null ||
|
||||
!outputColor.isValid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RenderGraphRasterPassBuilder passBuilder =
|
||||
context.AddRasterPass(
|
||||
renderGraph.AddRasterPass(
|
||||
ResolveFullscreenPassName(
|
||||
passName,
|
||||
kFinalColorFullscreenPassName));
|
||||
@@ -487,19 +487,19 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
|
||||
private static bool TryResolveDefaultFullscreenTargets(
|
||||
ScriptableRenderContext context,
|
||||
RenderGraph renderGraph,
|
||||
out RenderGraphTextureHandle sourceColor,
|
||||
out RenderGraphTextureHandle outputColor)
|
||||
{
|
||||
sourceColor = new RenderGraphTextureHandle();
|
||||
outputColor = new RenderGraphTextureHandle();
|
||||
if (context == null)
|
||||
if (renderGraph == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
sourceColor = context.sourceColorTexture;
|
||||
outputColor = context.primaryColorTarget;
|
||||
sourceColor = renderGraph.sourceColorTexture;
|
||||
outputColor = renderGraph.primaryColorTarget;
|
||||
return sourceColor.isValid &&
|
||||
outputColor.isValid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user