GS-hw: Fix invert rounding for accumulation blend on gl.

Also make the checks consistent for all renderers.
This commit is contained in:
lightningterror 2023-03-06 20:41:09 +01:00
parent 084fdc0a65
commit 911d35e800
3 changed files with 5 additions and 5 deletions

View File

@ -743,7 +743,7 @@ void ps_dither(inout float3 C, float2 pos_xy)
fpos = int2(pos_xy / (float)PS_SCALE_FACTOR);
float value = DitherMatrix[fpos.x & 3][fpos.y & 3];
if (PS_ROUND_INV != 0)
if (PS_ROUND_INV)
C -= value;
else
C += value;
@ -756,7 +756,7 @@ void ps_color_clamp_wrap(inout float3 C)
// so we need to limit the color depth on dithered items
if (SW_BLEND || PS_DITHER || PS_FBMASK)
{
if (PS_DFMT == FMT_16 && PS_BLEND_MIX == 0 && PS_ROUND_INV != 0)
if (PS_DFMT == FMT_16 && PS_BLEND_MIX == 0 && PS_ROUND_INV)
C += 7.0f; // Need to round up, not down since the shader will invert
// Standard Clamp

View File

@ -669,8 +669,8 @@ void ps_color_clamp_wrap(inout vec3 C)
// so we need to limit the color depth on dithered items
#if SW_BLEND || PS_DITHER || PS_FBMASK
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0
C += 7.f; // Need to round up, not down since the shader will invert
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0 && PS_ROUND_INV
C += 7.0f; // Need to round up, not down since the shader will invert
#endif
// Correct the Color value based on the output format

View File

@ -985,7 +985,7 @@ void ps_color_clamp_wrap(inout vec3 C)
// so we need to limit the color depth on dithered items
#if SW_BLEND || PS_DITHER || PS_FBMASK
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0 && PS_ROUND_INV != 0
#if PS_DFMT == FMT_16 && PS_BLEND_MIX == 0 && PS_ROUND_INV
C += 7.0f; // Need to round up, not down since the shader will invert
#endif