mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
Merge branch 'ogl-shader-light-clamp' into 'next'
Clamp light level for shaders. Fixes #194. Closes #194 See merge request STJr/SRB2!1085
This commit is contained in:
commit
932bf9b20e
1 changed files with 3 additions and 0 deletions
|
@ -214,6 +214,9 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
|
|||
poly_color.s.blue = (UINT8)blue;
|
||||
}
|
||||
|
||||
// Clamp the light level, since it can sometimes go out of the 0-255 range from animations
|
||||
light_level = min(max(light_level, 0), 255);
|
||||
|
||||
Surface->PolyColor.rgba = poly_color.rgba;
|
||||
Surface->TintColor.rgba = tint_color.rgba;
|
||||
Surface->FadeColor.rgba = fade_color.rgba;
|
||||
|
|
Loading…
Reference in a new issue