From efbd80c3258e94f6e8e3c665594976c02d51f663 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Jun 2020 15:16:50 +0200 Subject: [PATCH] - fixed: the attenuation flag wasn't passed to the shader if shadowmaps were disabled. --- src/rendering/hwrenderer/hw_dynlightdata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendering/hwrenderer/hw_dynlightdata.cpp b/src/rendering/hwrenderer/hw_dynlightdata.cpp index 82087a851..dddc9ad4d 100644 --- a/src/rendering/hwrenderer/hw_dynlightdata.cpp +++ b/src/rendering/hwrenderer/hw_dynlightdata.cpp @@ -111,10 +111,10 @@ void AddLightToList(FDynLightData &dld, int group, FDynamicLight * light, bool f { shadowIndex = light->mShadowmapIndex + 1.0f; - // Store attenuate flag in the sign bit of the float. - if (light->IsAttenuated() || forceAttenuate) shadowIndex = -shadowIndex; } else shadowIndex = 1025.f; + // Store attenuate flag in the sign bit of the float. + if (light->IsAttenuated() || forceAttenuate) shadowIndex = -shadowIndex; float lightType = 0.0f; float spotInnerAngle = 0.0f;