feat(srp): add drawing settings override material seam

- add a managed DrawingSettings seam for scene draw authoring
- let builtin forward scene draws use an override material when provided
- wire DrawObjectsPass and RenderObjectsRendererFeature through the new settings
This commit is contained in:
2026-04-20 22:46:19 +08:00
parent fece3a84ad
commit 0319680954
12 changed files with 158 additions and 18 deletions

View File

@@ -13,6 +13,7 @@ namespace Gameplay
public bool HasPublicContextRecordSceneInjectionPoint;
public bool HasPublicContextDrawRenderersByType;
public bool HasPublicContextDrawRenderersByDesc;
public bool HasPublicContextDrawRenderersByDescAndSettings;
public bool HasPublicContextDrawOpaqueRenderers;
public bool HasPublicContextDrawTransparentRenderers;
public bool HasPublicContextRecordOpaqueScenePhase;
@@ -66,6 +67,7 @@ namespace Gameplay
public bool HasSceneRenderPhaseType;
public bool HasSceneRenderInjectionPointType;
public bool HasRendererListType;
public bool HasDrawingSettingsType;
public bool HasRenderQueueRangeType;
public bool HasRendererSortModeType;
public bool HasFilteringSettingsType;
@@ -135,6 +137,18 @@ namespace Gameplay
typeof(RendererListDesc)
},
null) != null;
HasPublicContextDrawRenderersByDescAndSettings =
contextType.GetMethod(
"DrawRenderers",
PublicInstanceMethodFlags,
null,
new System.Type[]
{
typeof(SceneRenderPhase),
typeof(RendererListDesc),
typeof(DrawingSettings)
},
null) != null;
HasPublicContextDrawOpaqueRenderers =
contextType.GetMethod(
"DrawOpaqueRenderers",
@@ -353,6 +367,9 @@ namespace Gameplay
HasRendererListType =
contextType.Assembly.GetType(
"XCEngine.Rendering.RendererListType") != null;
HasDrawingSettingsType =
contextType.Assembly.GetType(
"XCEngine.Rendering.DrawingSettings") != null;
HasRenderQueueRangeType =
contextType.Assembly.GetType(
"XCEngine.Rendering.RenderQueueRange") != null;