Remix.run Logo
Ordered dithering with arbitrary or irregular colour palettes (2023)(matejlou.blog)
58 points by surprisetalk 6 days ago | 9 comments
yehoshuapw 27 minutes ago | parent | next [-]

Matt Parker video about dithering, worth a watch:

https://m.youtube.com/watch?v=kT4p1GXq4HY

geon 2 hours ago | parent | prev | next [-]

Funny. I referenced this exact article yesterday and implemented N-Closest.

There was a surprising amount of parameters to fiddle with. Especially since I experimented with adjusting the N depending on the distance of the matches.

I wanted to implement ordered dithering to convert images to the c64.

I think dithering looks best when there are only 2 colors involved the mix, but the palette is a bit wonky so a lot of colors are hard to represent well.

An issue I noticed was that when the top 2 candidates in a gradient flipped from A,B to B,A as the gradient moved closer to B, was that the checker pattern would get an ugly seam of double pixels, like ABABABBABABA.

I’ll experiment more with manually selecting pairs of colors that mix well and generate gradient ramps from them. Then I can pre-quantize the image and use a predetermined dither pattern for each mix. Should also allow for more artistic control.

anArbitraryOne an hour ago | parent | prev | next [-]

I love dithering in a platonic way

vardump 4 hours ago | parent | prev [-]

Are there other uses remaining for ordered dithering than retro look and perhaps e-ink?

the8472 2 hours ago | parent | next [-]

Shallow color gradients (e.g. blue sky or anime) result in visible banding on 8bpc displays, which is a large fraction of displays. Ordered dithering is GPU-friendly, so it's useful to reduce higher-bpc content to those display formats without introducing banding.

chmod775 2 hours ago | parent | prev | next [-]

Light sources in video games and such. If you have a light source with a very large falloff range illuminating a large area, you'll have noticable steps in the gradient.

Ordered dithering is a very cheap solution to this.

krapht 4 hours ago | parent | prev | next [-]

Lots of sensors these days will give you 10 or 12 bits of data per color channel. You may want ordered dithering when previewing on an 8 bit display.

0xMalotru 4 hours ago | parent | prev [-]

Yep e-ink is a good practical use. In fact any system with black and white display use ordered dithering when they want to draw images

Lerc 2 hours ago | parent [-]

I would think that it would only be beneficial on devices that don't maintain a full frame rendering buffer or if they wanted to do partial updates.

If the full frame is maintained with more values then quite a lot of things like Floyd Steinberg optimize well enough to be integrated with a full frame update.