mirror of https://github.com/PCSX2/pcsx2.git
GS-hw: Rename alpha_clamp to blend_mix.
This commit is contained in:
parent
45b5347092
commit
7151848406
|
@ -49,7 +49,7 @@
|
||||||
#define PS_BLEND_B 0
|
#define PS_BLEND_B 0
|
||||||
#define PS_BLEND_C 0
|
#define PS_BLEND_C 0
|
||||||
#define PS_BLEND_D 0
|
#define PS_BLEND_D 0
|
||||||
#define PS_ALPHA_CLAMP 0
|
#define PS_BLEND_MIX 0
|
||||||
#define PS_PABE 0
|
#define PS_PABE 0
|
||||||
#define PS_DITHER 0
|
#define PS_DITHER 0
|
||||||
#define PS_ZCLAMP 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);
|
float3 D = (PS_BLEND_D == 0) ? Cs : ((PS_BLEND_D == 1) ? Cd : (float3)0.0f);
|
||||||
|
|
||||||
// As/Af clamp alpha for Blend mix
|
// As/Af clamp alpha for Blend mix
|
||||||
if (PS_ALPHA_CLAMP)
|
if (PS_BLEND_MIX)
|
||||||
C = min(C, (float)1.0f);
|
C = min(C, (float)1.0f);
|
||||||
|
|
||||||
Color.rgb = (PS_BLEND_A == PS_BLEND_B) ? D : trunc(((A - B) * C) + D);
|
Color.rgb = (PS_BLEND_A == PS_BLEND_B) ? D : trunc(((A - B) * C) + D);
|
||||||
|
|
|
@ -706,7 +706,7 @@ void ps_blend(inout vec4 Color, float As)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// As/Af clamp alpha for Blend mix
|
// As/Af clamp alpha for Blend mix
|
||||||
#if PS_ALPHA_CLAMP
|
#if PS_BLEND_MIX
|
||||||
C = min(C, float(1.0f));
|
C = min(C, float(1.0f));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1046,7 +1046,7 @@ void ps_blend(inout vec4 Color, float As)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// As/Af clamp alpha for Blend mix
|
// As/Af clamp alpha for Blend mix
|
||||||
#if PS_ALPHA_CLAMP
|
#if PS_BLEND_MIX
|
||||||
C = min(C, 1.0f);
|
C = min(C, 1.0f);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ struct alignas(16) GSHWDrawConfig
|
||||||
u32 clr_hw : 3;
|
u32 clr_hw : 3;
|
||||||
u32 hdr : 1;
|
u32 hdr : 1;
|
||||||
u32 colclip : 1;
|
u32 colclip : 1;
|
||||||
u32 alpha_clamp : 1;
|
u32 blend_mix : 1;
|
||||||
u32 pabe : 1;
|
u32 pabe : 1;
|
||||||
|
|
||||||
// Others ways to fetch the texture
|
// Others ways to fetch the texture
|
||||||
|
|
|
@ -187,7 +187,7 @@ void GSDevice11::SetupPS(PSSelector sel, const GSHWDrawConfig::PSConstantBuffer*
|
||||||
sm.AddMacro("PS_BLEND_B", sel.blend_b);
|
sm.AddMacro("PS_BLEND_B", sel.blend_b);
|
||||||
sm.AddMacro("PS_BLEND_C", sel.blend_c);
|
sm.AddMacro("PS_BLEND_C", sel.blend_c);
|
||||||
sm.AddMacro("PS_BLEND_D", sel.blend_d);
|
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_PABE", sel.pabe);
|
||||||
sm.AddMacro("PS_DITHER", sel.dither);
|
sm.AddMacro("PS_DITHER", sel.dither);
|
||||||
sm.AddMacro("PS_ZCLAMP", sel.zclamp);
|
sm.AddMacro("PS_ZCLAMP", sel.zclamp);
|
||||||
|
|
|
@ -796,7 +796,7 @@ void GSRendererNew::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER)
|
||||||
else if (blend_mix)
|
else if (blend_mix)
|
||||||
{
|
{
|
||||||
m_conf.blend = {blend_index, ALPHA.FIX, ALPHA.C == 2, false, true};
|
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)
|
if (blend_mix1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1111,7 +1111,7 @@ std::string GSDeviceOGL::GetPSSource(PSSelector sel)
|
||||||
+ format("#define PS_HDR %d\n", sel.hdr)
|
+ format("#define PS_HDR %d\n", sel.hdr)
|
||||||
+ format("#define PS_DITHER %d\n", sel.dither)
|
+ format("#define PS_DITHER %d\n", sel.dither)
|
||||||
+ format("#define PS_ZCLAMP %d\n", sel.zclamp)
|
+ 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_PABE %d\n", sel.pabe)
|
||||||
+ format("#define PS_SCANMSK %d\n", sel.scanmsk)
|
+ format("#define PS_SCANMSK %d\n", sel.scanmsk)
|
||||||
+ format("#define PS_SCALE_FACTOR %d\n", GSConfig.UpscaleMultiplier)
|
+ format("#define PS_SCALE_FACTOR %d\n", GSConfig.UpscaleMultiplier)
|
||||||
|
|
|
@ -1802,7 +1802,7 @@ VkShaderModule GSDeviceVK::GetTFXFragmentShader(GSHWDrawConfig::PSSelector sel)
|
||||||
AddMacro(ss, "PS_BLEND_B", sel.blend_b);
|
AddMacro(ss, "PS_BLEND_B", sel.blend_b);
|
||||||
AddMacro(ss, "PS_BLEND_C", sel.blend_c);
|
AddMacro(ss, "PS_BLEND_C", sel.blend_c);
|
||||||
AddMacro(ss, "PS_BLEND_D", sel.blend_d);
|
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_IIP", sel.iip);
|
||||||
AddMacro(ss, "PS_SHUFFLE", sel.shuffle);
|
AddMacro(ss, "PS_SHUFFLE", sel.shuffle);
|
||||||
AddMacro(ss, "PS_READ_BA", sel.read_ba);
|
AddMacro(ss, "PS_READ_BA", sel.read_ba);
|
||||||
|
|
Loading…
Reference in New Issue