Skip to content

Commit

Permalink
GS/HW: Enable PABE only when Alpha min is lower than 128.
Browse files Browse the repository at this point in the history
When alpha min is higher or equal to 128 we will always blend so no need to enable the pabe flag, enable only when alpha min is lower than 128.
  • Loading branch information
lightningterror committed Oct 20, 2023
1 parent 09574b3 commit 974ca6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3657,7 +3657,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, bool& DAT
// BLEND_HW_CLR1 with As/F and BLEND_HW_CLR2 can be done in hw.
const bool clr_blend = !!(blend_flag & (BLEND_HW_CLR1 | BLEND_HW_CLR2 | BLEND_HW_CLR3));
bool clr_blend1_2 = (blend_flag & (BLEND_HW_CLR1 | BLEND_HW_CLR2)) && (m_conf.ps.blend_c != 1) && !blend_ad_improved // Make sure it isn't an Ad case
&& !m_draw_env->PABE.PABE // No PABE as it will require sw blending.
&& !(m_draw_env->PABE.PABE && GetAlphaMinMax().min < 128) // No PABE as it will require sw blending.
&& (COLCLAMP.CLAMP) // Let's add a colclamp check too, hw blend will clamp to 0-1.
&& !(one_barrier || m_conf.require_full_barrier); // Also don't run if there are barriers present.

Expand Down Expand Up @@ -3870,9 +3870,9 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, bool& DAT
}

// Per pixel alpha blending
if (m_draw_env->PABE.PABE)
if (m_draw_env->PABE.PABE && GetAlphaMinMax().min < 128)
{
// Breath of Fire Dragon Quarter, Strawberry Shortcake, Super Robot Wars, Cartoon Network Racing.
// Breath of Fire Dragon Quarter, Strawberry Shortcake, Super Robot Wars, Cartoon Network Racing, Simple 2000 Series Vol.81, SOTC, Super Robot Wars.

if (sw_blending)
{
Expand Down

0 comments on commit 974ca6b

Please sign in to comment.