feat(rendering): add managed SRP renderer runtime
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Components/CameraComponent.h"
|
||||
#include "Rendering/Execution/DirectionalShadowExecutionState.h"
|
||||
#include "Rendering/Execution/Internal/CameraFrameGraph/Executor.h"
|
||||
#include "Rendering/GraphicsSettingsState.h"
|
||||
#include "Rendering/Internal/RenderPipelineFactory.h"
|
||||
#include "Rendering/Pipelines/ManagedScriptableRenderPipelineAsset.h"
|
||||
#include "Rendering/RenderPipelineAsset.h"
|
||||
@@ -88,7 +89,7 @@ void CameraRenderer::RefreshManagedPipelineBindingIfNeeded() {
|
||||
}
|
||||
|
||||
const size_t currentGeneration =
|
||||
Pipelines::GetManagedRenderPipelineEnvironmentGeneration();
|
||||
GetGraphicsSettingsState().GetEnvironmentGeneration();
|
||||
if (currentGeneration == m_managedPipelineEnvironmentGeneration) {
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +118,7 @@ void CameraRenderer::ResetPipeline(std::unique_ptr<RenderPipeline> pipeline) {
|
||||
|
||||
m_managedPipelineEnvironmentGeneration =
|
||||
UsesManagedPipelineBinding()
|
||||
? Pipelines::GetManagedRenderPipelineEnvironmentGeneration()
|
||||
? GetGraphicsSettingsState().GetEnvironmentGeneration()
|
||||
: 0u;
|
||||
}
|
||||
|
||||
|
||||
@@ -582,12 +582,22 @@ RenderPassContext BuildCameraFrameStageFallbackPassContext(
|
||||
RenderPipelineStageRenderGraphContext BuildCameraFramePipelineStageRenderGraphContext(
|
||||
const CameraFrameRenderGraphStageContext& context,
|
||||
const CameraFrameStageGraphBuildState& stageState) {
|
||||
return BuildRenderPipelineStageRenderGraphContext(
|
||||
RenderPipelineStageRenderGraphContext pipelineContext =
|
||||
BuildRenderPipelineStageRenderGraphContext(
|
||||
BuildCameraFrameStageGraphRecordingContext(
|
||||
context,
|
||||
stageState,
|
||||
context.sceneData),
|
||||
stageState.stage);
|
||||
pipelineContext.finalColorPolicy =
|
||||
context.plan.finalColorPolicy;
|
||||
pipelineContext.stageColorSource =
|
||||
context.plan.ResolveStageColorSource(stageState.stage);
|
||||
pipelineContext.usesGraphManagedOutputColor =
|
||||
context.plan.UsesGraphManagedOutputColor(stageState.stage);
|
||||
pipelineContext.directionalShadowPlan =
|
||||
context.plan.directionalShadow;
|
||||
return pipelineContext;
|
||||
}
|
||||
|
||||
bool RecordCameraFramePipelineStageGraphPass(
|
||||
|
||||
Reference in New Issue
Block a user