- added map option to disable shadowmaps.

Prompted by 'Hurt' which has > 4000 lights and runs into both performance issues and unpredictable light selection for the limited amount of shadowmap slots.
This commit is contained in:
Christoph Oelckers 2021-07-13 11:54:25 +02:00
commit 0cffeef2c6
5 changed files with 15 additions and 7 deletions

View file

@ -107,10 +107,9 @@ void AddLightToList(FDynLightData &dld, int group, FDynamicLight * light, bool f
}
float shadowIndex;
if (gl_light_shadowmap)
if (gl_light_shadowmap) // note: with gl_light_shadowmap switched off, we cannot rely on properly set indices anymore.
{
shadowIndex = light->mShadowmapIndex + 1.0f;
}
else shadowIndex = 1025.f;
// Store attenuate flag in the sign bit of the float.