From f467c02d1ad63384674e04dee1c8d896b1c68ea5 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sun, 4 Jul 2021 20:32:07 -0700 Subject: [PATCH] Ignore the top bit of the indirect texture matrix scale This fixes the Zora eye coloration in Twilight Princess. --- Source/Core/VideoCommon/BPMemory.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h index 25b54b6ba4..e63fb17dd3 100644 --- a/Source/Core/VideoCommon/BPMemory.h +++ b/Source/Core/VideoCommon/BPMemory.h @@ -375,7 +375,10 @@ union IND_MTXC { BitField<0, 11, s32> me; BitField<11, 11, s32> mf; - BitField<22, 2, u8, u32> s2; // bits 4-5 of scale factor + BitField<22, 1, u8, u32> s2; // bit 4 of scale factor + // The SDK treats the scale factor as 6 bits, 2 on each column; however, hardware seems to ignore + // the top bit. + BitField<22, 2, u8, u32> sdk_s2; u32 hex; };