Add option to use the old style of light leak fixing using the lightmap

This commit is contained in:
Xonk
2023-07-16 22:15:41 -04:00
parent 63bb1d3ad4
commit 8489bad7bc
3 changed files with 10 additions and 4 deletions

View File

@ -852,8 +852,12 @@ void main() {
DirectLightColor = vec3(0.0);
#endif
if(hand) DirectLightColor *= max(eyeBrightnessSmooth.y,0)/240.;
#ifdef OLD_LIGHTLEAK_FIX
DirectLightColor *= pow(clamp(eyeBrightnessSmooth.y/240. + lightmap.y,0.0,1.0),2.0);
#else
if(hand) DirectLightColor *= pow(clamp(eyeBrightnessSmooth.y/240. + lightmap.y,0.0,1.0),2.0);
#endif
vec3 AmbientLightColor = averageSkyCol_Clouds;