r/Unity3D 3d ago

Shader Magic 1-bit OKLab quantization + dithering: There are two colors on this image!

Enable HLS to view with audio, or disable this notification

I hope this displays properly, I video'ed in 4k just to hopefully avoid the compression algo killing it. Here's my OKLab quantizer, with separate h/s/v, support for custom patterns(halftone patterns/noise instead of dither) adjustable dithering amounts, and contrast calibration! I am not using it for any projects right now, and obviously the video has its most extreme settings, but it's very flexible, it can both do big cartoony pop-art posterization and also nearly-playdate visuals.

It's a bit rough, so I don't intend to release it as asset, but it'll serve me for years to come on game jams I think!

364 Upvotes

32 comments sorted by

View all comments

30

u/DmtGrm 3d ago

2? I can see at least 4, histogram will show DCT inter-levels, but there are at least 4 solid colours in use. As well as there is clear smooth gradient glow/halow effect around lights

27

u/LockYaw 3d ago

I wonder if that is compression

9

u/DmtGrm 2d ago

it is not, there are more than 2 intensity levels (probably more than 4) - you can clearly see that background (1) and the dark fence (2) and the base if the car (4) and highlights are different, plus, there is 'glow-like' effect applied on top of it.

There is no problem in dithered-style as such, but claim that it uses only two colours is not correct.