From 90cc83e2aca641471f711788678db7913e21c2da Mon Sep 17 00:00:00 2001 From: offtkp Date: Tue, 16 Jul 2024 15:48:34 +0300 Subject: [PATCH] Fix Luigi's flashlight in Luigi's Mansion --- src/host_shaders/opengl_fragment_shader.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host_shaders/opengl_fragment_shader.frag b/src/host_shaders/opengl_fragment_shader.frag index 1b8e97511..f7f49f466 100644 --- a/src/host_shaders/opengl_fragment_shader.frag +++ b/src/host_shaders/opengl_fragment_shader.frag @@ -347,7 +347,7 @@ void calcLighting(out vec4 primary_color, out vec4 secondary_color) { vec3 half_vector; for (uint i = 0u; i < GPUREG_LIGHTING_NUM_LIGHTS; i++) { - light_id = bitfieldExtract(GPUREG_LIGHTING_LIGHT_PERMUTATION, int(i * 3u), 3); + light_id = bitfieldExtract(GPUREG_LIGHTING_LIGHT_PERMUTATION, int(i * 4u), 3); uint GPUREG_LIGHTi_SPECULAR0 = readPicaReg(0x0140u + 0x10u * light_id); uint GPUREG_LIGHTi_SPECULAR1 = readPicaReg(0x0141u + 0x10u * light_id);