advanced

#40 Pixel Art Dithering

Bayer dithering and color quantization

Ordered dithering simulates wider color range from a limited palette by toggling pixels between palette colors based on a threshold pattern. The 4x4 Bayer matrix provides 16 evenly-spread threshold values. Each pixel compares its brightness offset against its Bayer position before quantization snaps colors to discrete levels. Combined with UV-snapping pixelation, this recreates the charm of 8-bit era graphics.

Key Concepts

Try this shader live in the Shader Sandbox editor with real-time preview.
Open in Sandbox

Source Code


    
← Previous Portal Vortex

All Tutorials