refactor(srp): move scene setup ownership into managed renderer
This commit is contained in:
@@ -64,11 +64,6 @@ namespace XCEngine.Rendering.Universal
|
||||
return GetPipelineRendererAssetKey();
|
||||
}
|
||||
|
||||
internal string GetRenderSceneSetupPolicyAssetKeyInstance()
|
||||
{
|
||||
return GetRenderSceneSetupPolicyAssetKey();
|
||||
}
|
||||
|
||||
internal string GetCameraFrameStandalonePassAssetKeyInstance(
|
||||
CameraFrameStage stage)
|
||||
{
|
||||
@@ -146,6 +141,39 @@ namespace XCEngine.Rendering.Universal
|
||||
}
|
||||
}
|
||||
|
||||
internal bool ConfigureRenderSceneSetupInstance(
|
||||
RenderSceneSetupContext context)
|
||||
{
|
||||
ConfigureRenderSceneSetup(context);
|
||||
|
||||
ScriptableRenderer renderer =
|
||||
GetRendererInstance();
|
||||
if (renderer != null)
|
||||
{
|
||||
renderer.ConfigureRenderSceneSetupInstance(
|
||||
context);
|
||||
}
|
||||
|
||||
ScriptableRendererFeature[] rendererFeatures =
|
||||
GetRendererFeatures();
|
||||
for (int i = 0; i < rendererFeatures.Length; ++i)
|
||||
{
|
||||
ScriptableRendererFeature rendererFeature =
|
||||
rendererFeatures[i];
|
||||
if (rendererFeature == null ||
|
||||
!rendererFeature.isActive)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
rendererFeature.ConfigureRenderSceneSetup(
|
||||
context);
|
||||
}
|
||||
|
||||
return context != null &&
|
||||
context.isConfigured;
|
||||
}
|
||||
|
||||
internal bool ConfigureDirectionalShadowExecutionStateInstance(
|
||||
DirectionalShadowExecutionContext context)
|
||||
{
|
||||
@@ -205,6 +233,11 @@ namespace XCEngine.Rendering.Universal
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void ConfigureRenderSceneSetup(
|
||||
RenderSceneSetupContext context)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void ConfigureDirectionalShadowExecutionState(
|
||||
DirectionalShadowExecutionContext context)
|
||||
{
|
||||
@@ -215,11 +248,6 @@ namespace XCEngine.Rendering.Universal
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private protected virtual string GetRenderSceneSetupPolicyAssetKey()
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private protected virtual string GetCameraFrameStandalonePassAssetKey(
|
||||
CameraFrameStage stage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user