refactor(srp): move urp shadow execution bridge into managed

This commit is contained in:
2026-04-21 17:41:44 +08:00
parent 578103f970
commit 1e16995757
15 changed files with 560 additions and 188 deletions

View File

@@ -76,12 +76,6 @@ namespace XCEngine.Rendering.Universal
stage);
}
internal string
GetDirectionalShadowExecutionPolicyAssetKeyInstance()
{
return GetDirectionalShadowExecutionPolicyAssetKey();
}
internal int GetRuntimeStateVersionInstance()
{
return m_runtimeStateVersion;
@@ -152,6 +146,42 @@ namespace XCEngine.Rendering.Universal
}
}
internal bool ConfigureDirectionalShadowExecutionStateInstance(
DirectionalShadowExecutionContext context)
{
ConfigureDirectionalShadowExecutionState(
context);
ScriptableRenderer renderer =
GetRendererInstance();
if (renderer != null)
{
renderer
.ConfigureDirectionalShadowExecutionStateInstance(
context);
}
ScriptableRendererFeature[] rendererFeatures =
GetRendererFeatures();
for (int i = 0; i < rendererFeatures.Length; ++i)
{
ScriptableRendererFeature rendererFeature =
rendererFeatures[i];
if (rendererFeature == null ||
!rendererFeature.isActive)
{
continue;
}
rendererFeature
.ConfigureDirectionalShadowExecutionState(
context);
}
return context != null &&
context.isConfigured;
}
protected virtual ScriptableRenderer CreateRenderer()
{
return null;
@@ -175,6 +205,11 @@ namespace XCEngine.Rendering.Universal
{
}
protected virtual void ConfigureDirectionalShadowExecutionState(
DirectionalShadowExecutionContext context)
{
}
private protected virtual string GetPipelineRendererAssetKey()
{
return string.Empty;
@@ -191,12 +226,6 @@ namespace XCEngine.Rendering.Universal
return string.Empty;
}
private protected virtual string
GetDirectionalShadowExecutionPolicyAssetKey()
{
return string.Empty;
}
protected virtual ScriptableRendererFeature[] CreateRendererFeatures()
{
return rendererFeatures ??