Add dithering for gradients
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user