diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2025-02-11 18:46:30 +0000 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2025-02-25 18:45:01 +0000 |
| commit | 7abb9e7974b6c597d951d3188405818bfcdb9d61 (patch) | |
| tree | 16f00961b3dccf87f9e16ad73afffef21e882534 /Source/Core/VideoBackends/Software/Tev.cpp | |
| parent | 030892abd981f661a5a272194089552122ddc331 (diff) | |
Sofware/Tev: use unswapped texture samples for depth
Diffstat (limited to 'Source/Core/VideoBackends/Software/Tev.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index 674c545759..17ddd5dcc5 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -467,6 +467,11 @@ void Tev::Draw() std::memset(texel, 0, 4); } + RawTexColor.r = texel[u32(ColorChannel::Red)]; + RawTexColor.g = texel[u32(ColorChannel::Green)]; + RawTexColor.b = texel[u32(ColorChannel::Blue)]; + RawTexColor.a = texel[u32(ColorChannel::Alpha)]; + const auto& swap = bpmem.tevksel.GetSwapTable(ac.tswap); TexColor.r = texel[u32(swap[ColorChannel::Red])]; TexColor.g = texel[u32(swap[ColorChannel::Green])]; @@ -551,13 +556,13 @@ void Tev::Draw() switch (bpmem.ztex2.type) { case ZTexFormat::U8: - ztex += TexColor[ALP_C]; + ztex += RawTexColor[ALP_C]; break; case ZTexFormat::U16: - ztex += TexColor[ALP_C] << 8 | TexColor[RED_C]; + ztex += RawTexColor[ALP_C] << 8 | RawTexColor[RED_C]; break; case ZTexFormat::U24: - ztex += TexColor[RED_C] << 16 | TexColor[GRN_C] << 8 | TexColor[BLU_C]; + ztex += RawTexColor[RED_C] << 16 | RawTexColor[GRN_C] << 8 | RawTexColor[BLU_C]; break; default: PanicAlertFmt("Invalid ztex format {}", bpmem.ztex2.type); |
