Only sets the layercount if the view has stereo and the stereoscopic type is multiview (#7987)

Co-authored-by: Powei Feng <powei@google.com>
This commit is contained in:
Grant Commodore
2024-07-25 00:31:51 -07:00
committed by GitHub
parent be4f287b07
commit ef4c4a76fc

View File

@@ -172,7 +172,7 @@ FrameGraphId<FrameGraphTexture> RendererUtils::colorPass(
data.color = builder.write(data.color, FrameGraphTexture::Usage::COLOR_ATTACHMENT);
data.depth = builder.write(data.depth, FrameGraphTexture::Usage::DEPTH_ATTACHMENT);
if (engine.getConfig().stereoscopicType == StereoscopicType::MULTIVIEW) {
if (view.hasStereo() && engine.getConfig().stereoscopicType == StereoscopicType::MULTIVIEW) {
layerCount = engine.getConfig().stereoscopicEyeCount;
}