diff --git a/bin/resources/shaders/dx11/tfx.fx b/bin/resources/shaders/dx11/tfx.fx index 8ab748abb8..ef9159ded5 100644 --- a/bin/resources/shaders/dx11/tfx.fx +++ b/bin/resources/shaders/dx11/tfx.fx @@ -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 diff --git a/bin/resources/shaders/opengl/tfx_fs.glsl b/bin/resources/shaders/opengl/tfx_fs.glsl index 24057e6552..6293b1f986 100644 --- a/bin/resources/shaders/opengl/tfx_fs.glsl +++ b/bin/resources/shaders/opengl/tfx_fs.glsl @@ -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 diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index 1b7a18bcce..d1df9ce5fd 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -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