mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 03:40:50 +00:00
- new renderer: handle light level underflows.
This commit is contained in:
parent
25d516c36f
commit
5e94eaff8e
1 changed files with 1 additions and 1 deletions
|
@ -421,7 +421,7 @@ __forceinline void SetLightAndFog(FRenderState& state, PalEntry fade, int palett
|
||||||
{
|
{
|
||||||
state.EnableFog(0);
|
state.EnableFog(0);
|
||||||
state.SetFog(0, 0);
|
state.SetFog(0, 0);
|
||||||
state.SetSoftLightLevel(gl_fogmode != 0 && ShadeDiv >= 1 / 1000.f ? 255 - Scale(shade, 255, numshades) : 255);
|
state.SetSoftLightLevel(gl_fogmode != 0 && ShadeDiv >= 1 / 1000.f ? max(0, 255 - Scale(shade, 255, numshades)) : 255);
|
||||||
state.SetLightParms(visibility, ShadeDiv / (numshades - 2));
|
state.SetLightParms(visibility, ShadeDiv / (numshades - 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue