refactor: generalize renderer builtin post process

This commit is contained in:
2026-04-02 14:49:00 +08:00
parent 697deb4e41
commit ec7a15d85b
17 changed files with 430 additions and 327 deletions

View File

@@ -114,21 +114,21 @@ inline ViewportRenderFallbackPolicy BuildGameViewportRenderFailurePolicy(
inline void ApplySceneViewportRenderRequestSetup(
const ViewportRenderTargets& targets,
const Rendering::BuiltinSceneViewPostProcessRequest* builtinSceneViewPostProcess,
const Rendering::BuiltinPostProcessRequest* builtinPostProcess,
Rendering::RenderPassSequence* postPasses,
Rendering::CameraRenderRequest& request) {
request.postScenePasses = nullptr;
request.objectId = {};
request.builtinSceneViewPostProcess = {};
request.builtinPostProcess = {};
if (postPasses != nullptr && postPasses->GetPassCount() > 0) {
request.postScenePasses = postPasses;
}
if (builtinSceneViewPostProcess != nullptr &&
builtinSceneViewPostProcess->IsRequested()) {
request.builtinSceneViewPostProcess = *builtinSceneViewPostProcess;
request.builtinSceneViewPostProcess.objectIdTextureView = targets.objectIdShaderView;
if (builtinPostProcess != nullptr &&
builtinPostProcess->IsRequested()) {
request.builtinPostProcess = *builtinPostProcess;
request.builtinPostProcess.objectIdTextureView = targets.objectIdShaderView;
}
if (targets.objectIdView == nullptr) {