From 28c5c72605711280a64fac387fa41e0f41b59f00 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 22 Sep 2020 22:15:27 +0200 Subject: [PATCH] - fixed: black fog does not mean FogColor == 0 because its alpha component is non-0 --- source/glbackend/glbackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 57c2ff7e6..6a84e5b7e 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -234,7 +234,7 @@ void PolymostRenderState::Apply(FRenderState& state, GLState& oldState) state.SetDepthFunc(DepthFunc); oldState.DepthFunc = DepthFunc; } - bool foggy = (GLInterface.useMapFog || FogColor); + bool foggy = (GLInterface.useMapFog || (FogColor & 0xffffff)); // Disable brightmaps if non-black fog is used. if (!(Flags & RF_FogDisabled) && ShadeDiv >= 1 / 1000.f && foggy) {