- 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

@ -85,7 +85,7 @@ CUSTOM_CVAR(Int, gl_shadowmap_quality, 512, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
bool IShadowMap::ShadowTest(const DVector3 &lpos, const DVector3 &pos)
{
if (mAABBTree && gl_light_shadowmap)
if (mAABBTree)
return mAABBTree->RayTest(lpos, pos) >= 1.0f;
else
return true;
@ -98,7 +98,7 @@ bool IShadowMap::PerformUpdate()
LightsProcessed = 0;
LightsShadowmapped = 0;
if (gl_light_shadowmap && (screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && CollectLights != nullptr)
if (CollectLights != nullptr)
{
UpdateCycles.Clock();
UploadAABBTree();