Skip to content

Commit

Permalink
Fix max alpha check for decorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Feb 27, 2024
1 parent 8702ae4 commit 339c370
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 339c370

Please sign in to comment.