From 25098082c78e899cc2e387547358fea8f7ca1f28 Mon Sep 17 00:00:00 2001 From: offtkp Date: Fri, 19 Jul 2024 02:45:09 +0300 Subject: [PATCH] Use lutID instead of lutIndex --- src/core/PICA/shader_gen_glsl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/PICA/shader_gen_glsl.cpp b/src/core/PICA/shader_gen_glsl.cpp index 61a2c57c3..21b553385 100644 --- a/src/core/PICA/shader_gen_glsl.cpp +++ b/src/core/PICA/shader_gen_glsl.cpp @@ -631,9 +631,9 @@ void FragmentGenerator::compileLUTLookup(std::string& shader, const PICA::Fragme const u32 lutScale = regs[InternalRegs::LightLUTScale]; // The way these bitfields are encoded is so cursed - float scale = scales[(lutScale >> (4 * lutIndex)) & 0x7]; - uint inputID = (lutSelect >> (4 * lutIndex)) & 0x7; - bool absEnabled = ((lutAbs >> (4 * lutIndex + 1)) & 0x1) == 0; // 0 = enabled... + float scale = scales[(lutScale >> (4 * lutID)) & 0x7]; + uint inputID = (lutSelect >> (4 * lutID)) & 0x7; + bool absEnabled = ((lutAbs >> (4 * lutID + 1)) & 0x1) == 0; // 0 = enabled... switch (inputID) { case 0: shader += "lut_lookup_delta = dot(normal, normalize(half_vector));\n"; break;