- fixed: the attenuation flag wasn't passed to the shader if shadowmaps were disabled.

This commit is contained in:
Christoph Oelckers 2020-06-12 15:16:50 +02:00
parent 80b5a66635
commit efbd80c325
1 changed files with 2 additions and 2 deletions

View File

@ -111,10 +111,10 @@ void AddLightToList(FDynLightData &dld, int group, FDynamicLight * light, bool f
{ {
shadowIndex = light->mShadowmapIndex + 1.0f; 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; 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 lightType = 0.0f;
float spotInnerAngle = 0.0f; float spotInnerAngle = 0.0f;