(no title)
momojo | 4 months ago
The only catch is that generating blue noise is a roughly O(n^2) algorithm. Its not feasible to be generated on the fly, so in practice you just pregenerate a bunch of blue-noise textures and tile them.
If you google 'pregenerated blue noise' you find plenty of them: https://momentsingraphics.de/BlueNoise.html
atoav|4 months ago
You don't need real noise, it is enough to have a single texture that is a bit bigger than the input image and then randomly offset and rotate it. If that random offset is random enough (so not pseudorandom with a low periodicity), nobody will ever notice.
Memory has gotten cheaper while latency deadlines are still deciding over how much you can do realtime. That means cheap tricks like this are not an embarrassing workaround, but sometimes the smart choice.
bobmcnamara|4 months ago
user____name|4 months ago
A lot of blue noise references: https://gist.github.com/pixelmager/5d25fa32987273b9608a2d2c6...
There also exist pseudo blue noise generators, e.g.: https://observablehq.com/@fil/pseudoblue https://www.shadertoy.com/view/3tB3z3
bazzargh|4 months ago
That's the kind of thing I use dithering on BBC Micro because it's such a cheap technique, here in a thread directly comparing to Bayer-like dithering https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/11200546490... or here faking the Windows XP desktop https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/11288651013...
abetusk|4 months ago
Why can't you create blue noise from walking a Hilbert curve and placing points randomly with a minimum and maximum threshold?
inhumantsar|4 months ago
the naive algorithm is O(n^2) where n is the number of pixels in an image. tiling and sampling pregenerated noise is O(n), so that's what most people use. the noise can be generated on the fly using a FFT-based algorithm, though it still needs to be applied iteratively so you'd typically end up with O(k n log n) s.t. 10 <= k <= 100.
this has been neat stuff to read up on. my favorite nugget of learning: blue noise is white noise that's fine through a high pass filter a few times. the result of a high pass filter is the same as subtracting the result of a low pass filter from the original signal. blurring is a low pass filter for images. since blue noise is high frequency information, blurring a noised up image effectively removes the blue noise. so the result looks like a blurred version of the original even though it contains a fraction of the original's information.