From f9a0901e8cd8e644cbf360e0192e1fd24df6cbb9 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Thu, 9 Nov 2023 18:41:57 +0000 Subject: [PATCH] Fix regression Scroll attenuation seems to disable ambient fog. If scroll attenuation is enabled it's telling the h/w to draw the real3d spot light on fog for the scroll fog layer. This should fix a regression where the background disappears on sega rally. --- Src/Graphics/New3D/New3D.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index 826fe23..55cba60 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -236,6 +236,10 @@ void CNew3D::DrawAmbientFog() continue; } + if (n.viewport.scrollAtt > 0.0f) { + continue; // scroll attenuation indicates scroll fog layer + } + if (n.viewport.fogParams[6] < fogAmbient) { nodePtr = &n; fogAmbient = n.viewport.fogParams[6];