Skip to content
Sphere dithered with SierraThe same sphere before ditheringSourceDithered

05Error diffusion

Sierra

Balances quality and performance with a three-line diffusion. Produces natural and crisp textures.

Author
Frank Sierra
Year
1986
Complexity
medium
Processing cost
3 / 5

How it works

Each pixel is rounded to black or white and the rounding error is pushed onto the neighbors still to be processed. Organic and detailed.

Error diffusion weights, as a fraction of 32, by position relative to the current pixel
Current pixel5/323/32
2/324/325/324/322/32
2/323/322/32
  • The error of the current pixel is spread over 10 neighbors that haven’t been processed yet.
  • All of the error is carried forward.
  • Rows are scanned in alternating directions (serpentine), which avoids diagonal streaks.