Dithering
Trade spatial noise for perceived smoothness when the output format cannot represent all the shades you want directly.
Interactive playground
Tweak the operator or scene live so the article connects to an immediate visual result.
Dithering
Use spatial structure or error diffusion to fake smooth gradients when the output only supports a small number of intensity levels.
Continuous gradient
Reference viewQuantized output
Interactive compareOrdered dithering uses a threshold pattern, while error diffusion pushes quantization mistakes into nearby pixels.
Family
Color & tone
Color spaces, gamma, tone mapping, compositing, and distribution-aware image remapping.
Builds on
2 topics
Read these first if you want the surrounding pipeline context.
Unlocks
0 next topics
Use these follow-ups when you want to keep turning the image-processing pipeline forward.
Learning paths
1
This topic appears in curated graphics progressions so the next step is obvious.
Problem
A gradient can look perfectly smooth in a high-precision buffer but break into obvious bands when stored with fewer levels or mapped to a tiny palette.
Intuition
Dithering deliberately scatters error or patterning across neighboring pixels so the eye perceives intermediate shades that the hardware or format cannot represent directly.
Core idea
- Quantize each pixel to the available levels or palette.
- Either compare against an ordered threshold pattern or spread the quantization error into neighbors.
- Let the viewer integrate the resulting spatial noise into a smoother perceived tone.
Worked example
A black-to-white ramp rendered with only a handful of gray levels bands badly without dithering. With a Bayer pattern or error diffusion, the same ramp looks much smoother from normal viewing distance.
Complexity
Ordered dithering is constant work per pixel. Error-diffusion methods are still linear in the number of pixels but require carrying local quantization error forward.
When to choose it
- Choose it when output precision or palette size is limited.
- Tone mapping should usually happen first if the scene is still HDR-like.
- Histogram equalization changes contrast; dithering changes how limited output levels are spatially arranged.
Key takeaways
- Dithering fights banding by adding structured or distributed noise.
- It is most relevant near the end of the pipeline when output precision becomes limited.
- Ordered and error-diffusion variants make different quality and cost trade-offs.
- Good dithering often looks noisy up close and smoother from a normal viewing distance.
Practice ideas
- Render the same gradient with no dithering, Bayer dithering, and error diffusion.
- Quantize a tone-mapped image to very low bit depth and compare the result with and without dithering.
- Experiment with dithering before and after gamma-aware output conversion.
Relation to other topics
- Tone mapping and gamma correction usually happen before final dithering decisions.
- Histogram equalization may increase contrast, which can make banding more visible and therefore increase the need for dithering.
- Alpha compositing can produce subtle gradients that later need protection from banding.
Build on these first
These topics supply the mental model or preceding stage that this page assumes.
Gamma Correction
Match linear-light math to display-encoded output so blends, shading, and gradients do not look mysteriously wrong.
Tone Mapping
Compress HDR-style scene values into a range a normal display can actually show while keeping highlights under control.
Related directions
These topics live nearby conceptually, even if they are not strict prerequisites.
Alpha Compositing
Combine foreground and background layers with transparency so multiple images or passes can share the same final frame.
Histogram Equalization
Redistribute grayscale values so a low-contrast image uses more of the available intensity range.
More from Color & tone
Stay in the same family when you want parallel operators built from the same mental model.
Alpha Compositing
Combine foreground and background layers with transparency so multiple images or passes can share the same final frame.
Color Spaces
Choose the right representation for the job, because RGB, HSV, linear light, and display-encoded values make different operations easy or safe.
Gamma Correction
Match linear-light math to display-encoded output so blends, shading, and gradients do not look mysteriously wrong.
Histogram Equalization
Redistribute grayscale values so a low-contrast image uses more of the available intensity range.
Paths that include this topic
Follow one of these sequences if you want a guided next step instead of open-ended browsing.
Color and tone pipeline
Track how values move from color spaces and gamma into dynamic-range compression, equalization, dithering, and compositing.
From the blog
Pair the graphics atlas with recent writing from the broader site whenever you want a wider engineering lens.