All guides

Halftone vs Ordered Dithering

Both methods approximate continuous tone with limited ink, but use different controls. Halftone varies dot area inside fixed cells. Bayer dithering compares each position against a threshold matrix. Magnification reveals variable-sized circles versus a regular pixel pattern whose density changes.

Fix the problem and environment

Both methods approximate continuous tone with limited ink, but use different controls. Halftone varies dot area inside fixed cells. Bayer dithering compares each position against a threshold matrix. Magnification reveals variable-sized circles versus a regular pixel pattern whose density changes.

The controlling code

float darkness=1.0-luminance;
float dotRadius=sqrt(darkness)*0.5;
float halftone=step(length(cellUV-0.5),dotRadius);
// bayerThreshold is a fixed [0,1] value from a 4x4 matrix.
float dither=step(bayerThreshold,luminance);

Verify in order

Use the same fixture in both cases, first matching which output means ink. Compare gradients and small text. The square root in dot radius compensates for area being proportional to radius squared.

Scope and common mistakes

Using luminance directly as radius biases tone. Ordered dithering creates visible periodic patterns; it is neither blue noise nor error diffusion.

Continue experimenting

Reference

Official documentation

Run the related examples