diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-07-07 16:35:50 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-07-08 15:48:14 -0700 |
| commit | 2feced2e332f29dd4ca500d76410e797403d562e (patch) | |
| tree | 7f3025a030c97f340fb03bdea60a9450536d5b5b /Source/Core/VideoBackends/Software/Tev.cpp | |
| parent | cfcc994f6c6966172c108ee73347d7ad3f0ae717 (diff) | |
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); |
