mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Sofware/Tev: use unswapped texture samples for depth
This commit is contained in:
@ -467,6 +467,11 @@ void Tev::Draw()
|
|||||||
std::memset(texel, 0, 4);
|
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);
|
const auto& swap = bpmem.tevksel.GetSwapTable(ac.tswap);
|
||||||
TexColor.r = texel[u32(swap[ColorChannel::Red])];
|
TexColor.r = texel[u32(swap[ColorChannel::Red])];
|
||||||
TexColor.g = texel[u32(swap[ColorChannel::Green])];
|
TexColor.g = texel[u32(swap[ColorChannel::Green])];
|
||||||
@ -551,13 +556,13 @@ void Tev::Draw()
|
|||||||
switch (bpmem.ztex2.type)
|
switch (bpmem.ztex2.type)
|
||||||
{
|
{
|
||||||
case ZTexFormat::U8:
|
case ZTexFormat::U8:
|
||||||
ztex += TexColor[ALP_C];
|
ztex += RawTexColor[ALP_C];
|
||||||
break;
|
break;
|
||||||
case ZTexFormat::U16:
|
case ZTexFormat::U16:
|
||||||
ztex += TexColor[ALP_C] << 8 | TexColor[RED_C];
|
ztex += RawTexColor[ALP_C] << 8 | RawTexColor[RED_C];
|
||||||
break;
|
break;
|
||||||
case ZTexFormat::U24:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlertFmt("Invalid ztex format {}", bpmem.ztex2.type);
|
PanicAlertFmt("Invalid ztex format {}", bpmem.ztex2.type);
|
||||||
|
@ -107,6 +107,7 @@ class Tev
|
|||||||
// color order: ABGR
|
// color order: ABGR
|
||||||
Common::EnumMap<TevColor, TevOutput::Color2> Reg;
|
Common::EnumMap<TevColor, TevOutput::Color2> Reg;
|
||||||
std::array<TevColor, 4> KonstantColors;
|
std::array<TevColor, 4> KonstantColors;
|
||||||
|
TevColor RawTexColor;
|
||||||
TevColor TexColor;
|
TevColor TexColor;
|
||||||
TevColor RasColor;
|
TevColor RasColor;
|
||||||
TevColor StageKonst;
|
TevColor StageKonst;
|
||||||
|
Reference in New Issue
Block a user