summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-02-15 00:32:14 -0500
committerGitHub <noreply@github.com>2025-02-15 00:32:14 -0500
commitc360ea0d9d5caaa0d305711eb1a86ad30d6353da (patch)
tree6b4855c836b69a6b45c505db1d83349d2ed39337 /Source/Core/VideoCommon/UberShaderPixel.cpp
parent0fc36bbfa94fb33e423d7a39d59b62a9b768d018 (diff)
parent5db6bd6054c6d535142102a3f54d8fa239f33b1c (diff)
Merge pull request #13344 from Tilka/dither
VideoCommon: simplify dither calculation
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp')
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index ca8f42ec8f..f9674aa5a3 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -1434,8 +1434,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
" // Flipper uses a standard 2x2 Bayer Matrix for 6 bit dithering\n"
" // Here the matrix is encoded into the two factor constants\n"
" int2 dither = int2(rawpos.xy) & 1;\n"
- " TevResult.rgb = (TevResult.rgb - (TevResult.rgb >> 6)) + abs(dither.y * 3 - "
- "dither.x * 2);\n"
+ " TevResult.rgb = (TevResult.rgb - (TevResult.rgb >> 6)) + (dither.x ^ dither.y) * "
+ "2 + dither.y;\n"
" }}\n\n");
// =========