From e565e1e6978601a10f46fbe06251deafadbfbbe6 Mon Sep 17 00:00:00 2001 From: Sungun Park Date: Tue, 22 Oct 2024 13:49:57 -0700 Subject: [PATCH] Use xvp for multiview + debug view When multiview is enabled with the combining debug option toggled on, we use an intermediate buffer that requires us to use the entire area of the buffer as the viewport. Use xvp in this case. --- filament/src/details/Renderer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filament/src/details/Renderer.cpp b/filament/src/details/Renderer.cpp index acb869a8bfd..12cc78a847f 100644 --- a/filament/src/details/Renderer.cpp +++ b/filament/src/details/Renderer.cpp @@ -1110,7 +1110,9 @@ void FRenderer::renderJob(RootArenaScope& rootArenaScope, FView& view) { // FIXME: we probably should take the dynamic scaling into account too // if MSAA is enabled, we end-up rendering in an intermediate buffer. This is the only case where // "!hasPostProcess" doesn't guarantee rendering into the swapchain. - passBuilder.scissorViewport(hasPostProcess || msaaOptions.enabled ? xvp : vp); + const bool useIntermediateBuffer = hasPostProcess || msaaOptions.enabled || + (isRenderingMultiview && engine.debug.stereo.combine_multiview_images); + passBuilder.scissorViewport(useIntermediateBuffer ? xvp : vp); // This one doesn't need to be a FrameGraph pass because it always happens by construction // (i.e. it won't be culled, unless everything is culled), so no need to complexify things.