GS-hw: Rename alpha_clamp to blend_mix.

This commit is contained in:
lightningterror 2022-02-18 12:24:32 +01:00
parent 45b5347092
commit 7151848406
8 changed files with 9 additions and 9 deletions

View File

@ -49,7 +49,7 @@
#define PS_BLEND_B 0
#define PS_BLEND_C 0
#define PS_BLEND_D 0
#define PS_ALPHA_CLAMP 0
#define PS_BLEND_MIX 0
#define PS_PABE 0
#define PS_DITHER 0
#define PS_ZCLAMP 0
@ -749,7 +749,7 @@ void ps_blend(inout float4 Color, float As, float2 pos_xy)
float3 D = (PS_BLEND_D == 0) ? Cs : ((PS_BLEND_D == 1) ? Cd : (float3)0.0f);
// As/Af clamp alpha for Blend mix
if (PS_ALPHA_CLAMP)
if (PS_BLEND_MIX)
C = min(C, (float)1.0f);
Color.rgb = (PS_BLEND_A == PS_BLEND_B) ? D : trunc(((A - B) * C) + D);

View File

@ -706,7 +706,7 @@ void ps_blend(inout vec4 Color, float As)
#endif
// As/Af clamp alpha for Blend mix
#if PS_ALPHA_CLAMP
#if PS_BLEND_MIX
C = min(C, float(1.0f));
#endif

View File

@ -1046,7 +1046,7 @@ void ps_blend(inout vec4 Color, float As)
#endif
// As/Af clamp alpha for Blend mix
#if PS_ALPHA_CLAMP
#if PS_BLEND_MIX
C = min(C, 1.0f);
#endif

View File

@ -231,7 +231,7 @@ struct alignas(16) GSHWDrawConfig
u32 clr_hw : 3;
u32 hdr : 1;
u32 colclip : 1;
u32 alpha_clamp : 1;
u32 blend_mix : 1;
u32 pabe : 1;
// Others ways to fetch the texture

View File

@ -187,7 +187,7 @@ void GSDevice11::SetupPS(PSSelector sel, const GSHWDrawConfig::PSConstantBuffer*
sm.AddMacro("PS_BLEND_B", sel.blend_b);
sm.AddMacro("PS_BLEND_C", sel.blend_c);
sm.AddMacro("PS_BLEND_D", sel.blend_d);
sm.AddMacro("PS_ALPHA_CLAMP", sel.alpha_clamp);
sm.AddMacro("PS_BLEND_MIX", sel.blend_mix);
sm.AddMacro("PS_PABE", sel.pabe);
sm.AddMacro("PS_DITHER", sel.dither);
sm.AddMacro("PS_ZCLAMP", sel.zclamp);

View File

@ -796,7 +796,7 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER)
else if (blend_mix)
{
m_conf.blend = {blend_index, ALPHA.FIX, ALPHA.C == 2, false, true};
m_conf.ps.alpha_clamp = 1;
m_conf.ps.blend_mix = 1;
if (blend_mix1)
{

View File

@ -1111,7 +1111,7 @@ std::string GSDeviceOGL::GetPSSource(PSSelector sel)
+ format("#define PS_HDR %d\n", sel.hdr)
+ format("#define PS_DITHER %d\n", sel.dither)
+ format("#define PS_ZCLAMP %d\n", sel.zclamp)
+ format("#define PS_ALPHA_CLAMP %d\n", sel.alpha_clamp)
+ format("#define PS_BLEND_MIX %d\n", sel.blend_mix)
+ format("#define PS_PABE %d\n", sel.pabe)
+ format("#define PS_SCANMSK %d\n", sel.scanmsk)
+ format("#define PS_SCALE_FACTOR %d\n", GSConfig.UpscaleMultiplier)

View File

@ -1802,7 +1802,7 @@ VkShaderModule GSDeviceVK::GetTFXFragmentShader(GSHWDrawConfig::PSSelector sel)
AddMacro(ss, "PS_BLEND_B", sel.blend_b);
AddMacro(ss, "PS_BLEND_C", sel.blend_c);
AddMacro(ss, "PS_BLEND_D", sel.blend_d);
AddMacro(ss, "PS_ALPHA_CLAMP", sel.alpha_clamp);
AddMacro(ss, "PS_BLEND_MIX", sel.blend_mix);
AddMacro(ss, "PS_IIP", sel.iip);
AddMacro(ss, "PS_SHUFFLE", sel.shuffle);
AddMacro(ss, "PS_READ_BA", sel.read_ba);