mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- fixed light level setup in palette emulation mode.
This commit is contained in:
parent
0e58203d92
commit
aeeec61f39
2 changed files with 2 additions and 3 deletions
|
@ -840,8 +840,6 @@ int32_t wallvisible(int32_t const x, int32_t const y, int16_t const wallnum);
|
|||
#define STATUS2DSIZ 144
|
||||
#define STATUS2DSIZ2 26
|
||||
|
||||
int32_t videoSetRenderMode(int32_t renderer);
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
void renderSetRollAngle(float rolla);
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,8 @@ vec4 ProcessTexel()
|
|||
|
||||
float visibility = max(uGlobVis * uLightFactor * z - ((u_flags & RF_ShadeInterpolate) != 0.0? 0.5 : 0.0), 0.0);
|
||||
float numShades = float(uPalLightLevels & 255);
|
||||
float shade = clamp((uLightLevel + visibility), 0.0, numShades - 1.0);
|
||||
float shade = (1.0 - uLightLevel) * (numShades);
|
||||
shade = clamp((shade + visibility), 0.0, numShades - 1.0);
|
||||
|
||||
int palindex = int(color.r * 255.0 + 0.1); // The 0.1 is for roundoff error compensation.
|
||||
int shadeindex = int(floor(shade));
|
||||
|
|
Loading…
Reference in a new issue