mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-30 16:01:49 +00:00
- eliminate an unexpected slow path in the fragment shader.
Apparently with checking uLightLevel the shader cannot discard the slow software lighting path entirely adding a significant amount of processing time. Changed to check the actual lightmode value, which re-enables the fast path again.
This commit is contained in:
parent
747c291ae1
commit
cd5aa65fda
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ vec4 getLightColor(Material material, float fogdist, float fogfactor)
|
|||
{
|
||||
vec4 color = vColor;
|
||||
|
||||
if (uLightLevel >= 0.0)
|
||||
if ((uPalLightLevels >> 16) >= 5) // gl_lightmode >= 5 are software lighting modes.
|
||||
{
|
||||
float newlightlevel = 1.0 - R_DoomLightingEquation(uLightLevel);
|
||||
color.rgb *= newlightlevel;
|
||||
|
|
Loading…
Reference in a new issue