From 339c37072be5703e70efcad0e171a091fd0b2a0e Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Tue, 27 Feb 2024 03:44:27 +0000 Subject: [PATCH] Fix max alpha check for decorrect --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index c8b68d4a306fea..95e325ae2b64f7 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -5279,9 +5279,11 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta } } + if (rt) { - const bool rta_decorrection = m_channel_shuffle || m_texture_shuffle || blend_alpha_max > 128 || m_conf.ps.fbmask || m_conf.ps.tex_is_fb; - if (rt && rta_decorrection) + const bool rta_decorrection = m_channel_shuffle || m_texture_shuffle || std::max(blend_alpha_max, rt->m_alpha_max) > 128 || m_conf.ps.fbmask || m_conf.ps.tex_is_fb; + + if (rta_decorrection) { if (rt->m_last_draw == s_n) rt->m_rt_alpha_scale = false; @@ -5291,7 +5293,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta m_conf.rt = rt->m_texture; } } - else if (rt) + else m_conf.ps.rta_correction = rt->m_rt_alpha_scale; }