refactor(srp): move urp shadow execution bridge into managed
This commit is contained in:
@@ -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 ??
|
||||
|
||||
Reference in New Issue
Block a user