SW/Rasterizer: Fix indirect stage using texture coordinates/maps >= 4

The masking was incorrect. This affects the main menu of The Last Avatar, though that menu also relies on copy filter functionality that is not correctly handled in the software renderer so the difference is not obvious; that game shuffles textures across all indices for some reason, so this issue would presumably result in subtle flickering.
This commit is contained in:
Pokechu22 2022-08-28 12:16:08 -07:00
parent b6ac63dc47
commit e04d23e086

View File

@ -291,9 +291,9 @@ static void BuildBlock(s32 blockX, s32 blockY)
u32 indref = bpmem.tevindref.hex;
for (unsigned int i = 0; i < bpmem.genMode.numindstages; i++)
{
u32 texmap = indref & 3;
u32 texmap = indref & 7;
indref >>= 3;
u32 texcoord = indref & 3;
u32 texcoord = indref & 7;
indref >>= 3;
CalculateLOD(&rasterBlock.IndirectLod[i], &rasterBlock.IndirectLinear[i], texmap, texcoord);