feat(srp): add descriptor-driven object draw authoring

- bridge renderer list descriptors into ScriptableRenderContext scene draw calls
- reuse DrawObjectsPass across Universal and project custom renderers
- add RenderObjectsRendererFeature for package-level object draw extension
This commit is contained in:
2026-04-20 22:05:38 +08:00
parent 3df87e941c
commit cee65fcf40
18 changed files with 493 additions and 73 deletions

View File

@@ -11,7 +11,8 @@ namespace Gameplay
public bool HasPublicContextRecordScene;
public bool HasPublicContextRecordScenePhase;
public bool HasPublicContextRecordSceneInjectionPoint;
public bool HasPublicContextDrawRenderers;
public bool HasPublicContextDrawRenderersByType;
public bool HasPublicContextDrawRenderersByDesc;
public bool HasPublicContextDrawOpaqueRenderers;
public bool HasPublicContextDrawTransparentRenderers;
public bool HasPublicContextRecordOpaqueScenePhase;
@@ -65,6 +66,10 @@ namespace Gameplay
public bool HasSceneRenderPhaseType;
public bool HasSceneRenderInjectionPointType;
public bool HasRendererListType;
public bool HasRendererSortModeType;
public bool HasFilteringSettingsType;
public bool HasSortingSettingsType;
public bool HasRendererListDescType;
public void Start()
{
@@ -107,10 +112,28 @@ namespace Gameplay
contextType.GetMethod(
"RecordSceneInjectionPoint",
PublicInstanceMethodFlags) != null;
HasPublicContextDrawRenderers =
HasPublicContextDrawRenderersByType =
contextType.GetMethod(
"DrawRenderers",
PublicInstanceMethodFlags) != null;
PublicInstanceMethodFlags,
null,
new System.Type[]
{
typeof(SceneRenderPhase),
typeof(RendererListType)
},
null) != null;
HasPublicContextDrawRenderersByDesc =
contextType.GetMethod(
"DrawRenderers",
PublicInstanceMethodFlags,
null,
new System.Type[]
{
typeof(SceneRenderPhase),
typeof(RendererListDesc)
},
null) != null;
HasPublicContextDrawOpaqueRenderers =
contextType.GetMethod(
"DrawOpaqueRenderers",
@@ -329,6 +352,18 @@ namespace Gameplay
HasRendererListType =
contextType.Assembly.GetType(
"XCEngine.Rendering.RendererListType") != null;
HasRendererSortModeType =
contextType.Assembly.GetType(
"XCEngine.Rendering.RendererSortMode") != null;
HasFilteringSettingsType =
contextType.Assembly.GetType(
"XCEngine.Rendering.FilteringSettings") != null;
HasSortingSettingsType =
contextType.Assembly.GetType(
"XCEngine.Rendering.SortingSettings") != null;
HasRendererListDescType =
contextType.Assembly.GetType(
"XCEngine.Rendering.RendererListDesc") != null;
}
}
}