Skip to content

Commit

Permalink
Use lutID instead of lutIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Jul 18, 2024
1 parent 90abf8a commit 2509808
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/PICA/shader_gen_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2509808

Please sign in to comment.