Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • $\begingroup$ It's amazing that the lerp at the edges gives a perfect looking result. I would expect at least a little deviation :P $\endgroup$ Commented Dec 4, 2017 at 3:15
  • $\begingroup$ Yea, I was positively surprised too :) I believe it works because we are scaling down the dither-magnitude linearly, at the same rate the signal is decreasing. So then at least the scale matches... but I agree that it is interesting that directly blending the distributions appears to have no negative side-effects. $\endgroup$ Commented Dec 17, 2017 at 13:16
  • $\begingroup$ @MikkelGjoel Unfortunately, your belief is incorrect due to a bug in your code. You re-used the same RNG for both dithertri and dithernorm instead of an independent one. Once you work through all the math and cancel all the terms, you'll find that you're not lerping at all! Instead, the code acts like a hard cutoff at v < 0.5 / depth || v > 1 - 0.5/depth, instantly switching to the uniform distribution there. Not that it takes away from the nice dithering you have, it's just needlessly complicated. Fixing the bug is actually bad, you'll end up with a worse dither. Just use a hard cutoff. $\endgroup$ Commented Apr 19, 2019 at 7:10
  • $\begingroup$ After digging even deeper I've found another issue in your shadertoy where you don't do gamma-correcting while averaging samples (you average in sRGB space which isn't linear). If you handle gamma appropriately we find that unfortunately we are not done yet. We must shape our noise to deal with the gamma correction. Here is a shadertoy displaying the issue: shadertoy.com/view/3tf3Dn. I've tried a bunch of things and couldn't get it to work, so I posted a question here: computergraphics.stackexchange.com/questions/8793/…. $\endgroup$ Commented Apr 23, 2019 at 1:52