mirror of https://github.com/PCSX2/pcsx2.git
GS-hw: Prefer sw blend for clr_blend1_2 on ultra blending.
Opengl/Vulkan: Prefer sw blend over hw for clr_blend1_2 on ultra blending, doing hw is less accurate and will introduce rounding issues. Direct3D11: Prefer sw blend over hw for clr_blend1_2 only when primitives don't overlap.
This commit is contained in:
parent
06766ddb98
commit
816ee9e545
|
@ -579,7 +579,7 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER)
|
|||
// BLEND_C_CLR1 with Ad, BLEND_C_CLR3 Cs > 0.5f will require sw blend.
|
||||
// BLEND_C_CLR1 with As/F, BLEND_C_CLR2_AF, BLEND_C_CLR2_AS can be done in hw.
|
||||
const bool clr_blend = !!(blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS | BLEND_C_CLR3));
|
||||
const bool clr_blend1_2 = (blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS))
|
||||
bool clr_blend1_2 = (blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS))
|
||||
&& (ALPHA.C != 1) // Make sure it isn't an Ad case
|
||||
&& !m_env.PABE.PABE // No PABE as it will require sw blending.
|
||||
&& (m_env.COLCLAMP.CLAMP) // Let's add a colclamp check too, hw blend will clamp to 0-1.
|
||||
|
@ -604,6 +604,7 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER)
|
|||
switch (GSConfig.AccurateBlendingUnit)
|
||||
{
|
||||
case AccBlendLevel::Ultra:
|
||||
clr_blend1_2 = false;
|
||||
sw_blending |= true;
|
||||
[[fallthrough]];
|
||||
case AccBlendLevel::Full:
|
||||
|
@ -644,7 +645,11 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER)
|
|||
switch (GSConfig.AccurateBlendingUnit)
|
||||
{
|
||||
case AccBlendLevel::Ultra:
|
||||
sw_blending |= (m_prim_overlap == PRIM_OVERLAP_NO);
|
||||
if (m_prim_overlap == PRIM_OVERLAP_NO)
|
||||
{
|
||||
clr_blend1_2 = false;
|
||||
sw_blending |= true;
|
||||
}
|
||||
[[fallthrough]];
|
||||
case AccBlendLevel::Full:
|
||||
sw_blending |= ((ALPHA.C == 1 || (blend_mix && (alpha_c2_high_one || alpha_c0_high_max_one))) && (m_prim_overlap == PRIM_OVERLAP_NO));
|
||||
|
|
Loading…
Reference in New Issue