feat(rendering): add shader-vector fullscreen SRP seam

Generalize the native fullscreen pass and descriptor plumbing so managed SRP can request shader-driven fullscreen stages without being locked to the ColorScale path.

Keep ColorScale as a convenience descriptor mapped to the builtin color-scale shader, and add native fullscreen factory coverage for the new shader-vector path.
This commit is contained in:
2026-04-18 16:08:01 +08:00
parent 2b6d62a127
commit 5fd474d08d
14 changed files with 286 additions and 70 deletions

View File

@@ -2,6 +2,12 @@ using XCEngine;
namespace Gameplay
{
internal static class BuiltinShaderPaths
{
public const string ColorScalePostProcess =
"builtin://shaders/color-scale-post-process";
}
public sealed class LegacyRenderPipelineApiProbeAsset : RenderPipelineAsset
{
}
@@ -142,11 +148,15 @@ namespace Gameplay
return context != null &&
context.stage == CameraFrameStage.PostProcess &&
context.RecordFullscreenPass(
FullscreenPassDescriptor.CreateColorScale(
new Vector4(1.10f, 0.95f, 0.90f, 1.0f))) &&
FullscreenPassDescriptor.CreateShaderVector(
BuiltinShaderPaths.ColorScalePostProcess,
new Vector4(1.10f, 0.95f, 0.90f, 1.0f),
"ColorScale")) &&
context.RecordFullscreenPass(
FullscreenPassDescriptor.CreateColorScale(
new Vector4(0.95f, 1.05f, 1.10f, 1.0f)));
FullscreenPassDescriptor.CreateShaderVector(
BuiltinShaderPaths.ColorScalePostProcess,
new Vector4(0.95f, 1.05f, 1.10f, 1.0f),
"ColorScale"));
}
}