- clamp the software light to never get brighter than the initial light level

This commit is contained in:
Magnus Norddahl 2018-09-23 17:58:17 +02:00
parent 38c8f0d585
commit 3b8b312fae
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ float R_DoomLightingEquation(float light)
lightscale = shade - vis; lightscale = shade - vis;
// Result is the normalized colormap index (0 bright .. 1 dark) // Result is the normalized colormap index (0 bright .. 1 dark)
return clamp(lightscale, 0.0, 31.0 / 32.0); return clamp(lightscale, 1.0 - light, 31.0 / 32.0);
} }
//=========================================================================== //===========================================================================