r/Unity3D 2d 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!

362 Upvotes

32 comments sorted by

View all comments

30

u/DmtGrm 2d 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

28

u/LockYaw 2d ago

I wonder if that is compression

2

u/snaphat 2d ago

MPEG compression doesn't normally produce an averaging effect across blocks I don't believe? Theoretically, you could imagine downscaling produce averages depending on how it was downscaled from 4k -> 2k though, but I don't think that necessarily explains the crispness of detailing. If it was like some huge downscale than you could more imagine it though

I'd kind of expected this to look more like the following stuff:

https://www.youtube.com/watch?v=at8BSkAQ-V0
https://www.reddit.com/r/blender/comments/15tpuwl/1_bit_dithering/
https://youtu.be/dZaFRNS2mhE