Comment by abstractspoon

3 months ago

They answered the question in the first two sentences: We don't need it, it's just an aesthetic nowadays.

Dithering can be for aesthetic reasons, I presume especially old-school dithering that is especially pronounced. However, dithering is actually still useful in all sorts of signal processing, particularly when there are perceptible artifacts of quantization. This occurs all the time: you can trivially observe it by making gradients that go between close looking colors, something you can see on the web right now. There are many techniques to avoid banding like this, but dithering lets you hide banding without needing increased bit depth or choosing strategic stop colors by trading off spatial resolution for (perceived) color resolution, which works excellently for gradients because it's all low frequency.

And frankly, it turns out 256 colors is quite a lot of colors especially for a small image, so with a very good quantization algorithm and a very good dithering algorithm, you can seriously crunch a lot of things down to PNG8 with no obvious loss in quality. I have done this at many of my employers, armed with other tricks, to dramatically reduce page load sizes.

Dithering isn't only applied to 2D graphics, it can be applied in any type of spatial or temporal data to reduce the noise floor, or tune aliasing distortion noise to other parts of the frequency spectrum. Also common in audio.

It's not just aesthetic, I keep seeing games with color banding because they don't bother to dither before quantizing.

  • From the article:

    > We don't really need dithering anymore because we have high bit-depth colors so its largely just a retro aesthetic now.

    By the way, dithering in video creates additional problems because you want some kind of stability between successive frames.

    • The article is simple wrong, dithering is still widely used, and no we do not have enough color depth to avoid it. Go render a blue sky gradient without dithering, you will see obvious bands.

      1 reply →

    • You can do with a static dither pattern (I've done it, and it works well). It's a bit of a trade-off between banding and noise, but at least static stuff stays static and thus easily compressable.