diff options
| author | Tilka <tilkax@gmail.com> | 2021-07-11 22:59:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-11 22:59:23 +0100 |
| commit | 20a8e9c872362f39dcb1319a39040cd85dc2d7dc (patch) | |
| tree | 7232511a6fded798b7af34d44d55d933f86bcf39 /Source/Core/VideoBackends/Software/Tev.cpp | |
| parent | f9baff46a63176d57fdc3b363d59adc861ac003a (diff) | |
| parent | a379456f381f474bfdcb993fd4b28c84de5400d3 (diff) | |
Merge pull request #9876 from Pokechu22/skyward-sword-map
Fix indirect textures when format is not ITF_8
Diffstat (limited to 'Source/Core/VideoBackends/Software/Tev.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index 1d668acc29..f8af6325db 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -459,22 +459,22 @@ void Tev::Indirect(unsigned int stageNum, s32 s, s32 t) AlphaBump = AlphaBump & 0xf8; break; case IndTexFormat::ITF_5: - indcoord[0] = (indmap[TextureSampler::ALP_SMP] & 0x1f) + bias[0]; - indcoord[1] = (indmap[TextureSampler::BLU_SMP] & 0x1f) + bias[1]; - indcoord[2] = (indmap[TextureSampler::GRN_SMP] & 0x1f) + bias[2]; - AlphaBump = AlphaBump & 0xe0; + indcoord[0] = (indmap[TextureSampler::ALP_SMP] >> 3) + bias[0]; + indcoord[1] = (indmap[TextureSampler::BLU_SMP] >> 3) + bias[1]; + indcoord[2] = (indmap[TextureSampler::GRN_SMP] >> 3) + bias[2]; + AlphaBump = AlphaBump << 5; break; case IndTexFormat::ITF_4: - indcoord[0] = (indmap[TextureSampler::ALP_SMP] & 0x0f) + bias[0]; - indcoord[1] = (indmap[TextureSampler::BLU_SMP] & 0x0f) + bias[1]; - indcoord[2] = (indmap[TextureSampler::GRN_SMP] & 0x0f) + bias[2]; - AlphaBump = AlphaBump & 0xf0; + indcoord[0] = (indmap[TextureSampler::ALP_SMP] >> 4) + bias[0]; + indcoord[1] = (indmap[TextureSampler::BLU_SMP] >> 4) + bias[1]; + indcoord[2] = (indmap[TextureSampler::GRN_SMP] >> 4) + bias[2]; + AlphaBump = AlphaBump << 4; break; case IndTexFormat::ITF_3: - indcoord[0] = (indmap[TextureSampler::ALP_SMP] & 0x07) + bias[0]; - indcoord[1] = (indmap[TextureSampler::BLU_SMP] & 0x07) + bias[1]; - indcoord[2] = (indmap[TextureSampler::GRN_SMP] & 0x07) + bias[2]; - AlphaBump = AlphaBump & 0xf8; + indcoord[0] = (indmap[TextureSampler::ALP_SMP] >> 5) + bias[0]; + indcoord[1] = (indmap[TextureSampler::BLU_SMP] >> 5) + bias[1]; + indcoord[2] = (indmap[TextureSampler::GRN_SMP] >> 5) + bias[2]; + AlphaBump = AlphaBump << 3; break; default: PanicAlertFmt("Invalid indirect format {}", indirect.fmt); |
