From 937348a36fcf642f4aa0644bda845e30007d2d1f Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Tue, 20 Aug 2024 03:17:53 +0300 Subject: [PATCH] OpenGL: Fix shift signedness in fog calculation --- src/host_shaders/opengl_fragment_shader.frag | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/host_shaders/opengl_fragment_shader.frag b/src/host_shaders/opengl_fragment_shader.frag index f439b5cd0..9f07df0b9 100644 --- a/src/host_shaders/opengl_fragment_shader.frag +++ b/src/host_shaders/opengl_fragment_shader.frag @@ -524,8 +524,8 @@ void main() { // Annoyingly color is not encoded in the same way as light color float r = float(GPUREG_FOG_COLOR & 0xFFu); - float g = float((GPUREG_FOG_COLOR >> 8) & 0xFFu); - float b = float((GPUREG_FOG_COLOR >> 16) & 0xFFu); + float g = float((GPUREG_FOG_COLOR >> 8u) & 0xFFu); + float b = float((GPUREG_FOG_COLOR >> 16u) & 0xFFu); vec3 fog_color = (1.0 / 255.0) * vec3(r, g, b); fragColour.rgb = mix(fog_color, fragColour.rgb, fog_factor); @@ -561,4 +561,4 @@ void main() { break; } } -} \ No newline at end of file +}