Fix Apple GLSL compile errors

This commit is contained in:
Magnus Norddahl 2016-07-23 17:19:07 +02:00 committed by Christoph Oelckers
parent c08fc8f5a8
commit 669238db66
1 changed files with 2 additions and 2 deletions

View File

@ -141,8 +141,8 @@ float R_DoomLightingEquation(float light)
/* The zdoom light equation */
float vis = globVis / z;
float shade = 64.0 - (L + 12) * 32.0/128.0;
float lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31/32.0);
float shade = 64.0 - (L + 12.0) * 32.0/128.0;
float lightscale = clamp((shade - min(24.0, vis)) / 32.0, 0.0, 31.0/32.0);
// Result is the normalized colormap index (0 bright .. 1 dark)
return lightscale;