← Crafts
ALGORITHM·Apr 2024

Bayer Dithering

Ordered dithering algorithm rendered on a canvas in real time.

Bayer Dithering

An ordered dithering algorithm using a 4×4 Bayer Matrix. This process creates a deterministic, structured pattern that simulates gradients using binary states.

The threshold matrix is applied per-pixel against the luminance value of the source image. The result is a high-contrast halftone-like render with no randomness — purely mathematical.

Specs

StackCanvas API · TypeScript
Runtime0.04 ms @ 60 FPS
ArtifactB_DITHER_4X4_STABLE