Add dithering for gradients

This commit is contained in:
2026-03-04 00:48:02 -05:00
parent b01fa2261a
commit 5aa0d7466e
3 changed files with 10 additions and 2 deletions

View File

@@ -148,6 +148,10 @@ float4 PSMain(PSInput input) : SV_TARGET {
}
}
// Dither to reduce gradient banding (interleaved gradient noise)
float dither = frac(52.9829189 * frac(dot(input.pos.xy, float2(0.06711056, 0.00583715)))) - 0.5;
col.rgb += dither / 255.0;
if (col.a < 0.002) discard;
return col;
}