From b67126e917687a13c36a0177061dc8ad0a68f102 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 31 Dec 2023 00:04:14 +1000 Subject: [PATCH] GS/HW: Use DECAL/TCC for GT4 render fix That way the channel gets actually written to alpha. --- pcsx2/GS/Renderers/HW/GSHwHack.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index 4ba3c7b196..eb9a16c50c 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -739,13 +739,21 @@ bool GSHwHack::GSC_PolyphonyDigitalGames(GSRendererHW& r, int& skip) continue; } + // Need the alpha channel. dst->m_TEX0.PSM = PSMCT32; + + // Alpha is unknown, since it comes from RGB. + dst->m_alpha_min = 0; + dst->m_alpha_max = 255; + dst->UpdateValidChannels(PSMCT32, fbmsk); dst->UpdateValidity(GSVector4i::loadh(size)); GSHWDrawConfig& config = r.BeginHLEHardwareDraw( dst->GetTexture(), nullptr, dst->GetScale(), src->GetTexture(), src->GetScale(), src->GetUnscaledRect()); config.pal = palette->GetPaletteGSTexture(); + config.ps.tfx = TFX_DECAL; + config.ps.tcc = true; config.ps.channel = ChannelFetch_RED + channel; config.colormask.wrgba = 8; r.EndHLEHardwareDraw(false);