4 ms·
Hey, I'm Bart, author of the blog post that got linked in this HN. :) Your points re error diffusion being way better are true; the difference is night-and-day
by bartwr 7y ago
Hey, I'm Bart, author of the blog post that got linked in this HN. :)
Your points re error diffusion being way better are true; the difference is night-and-day, especially on some thin features / lines.
At the same time, error diffusion is not GPU-friendly at all, especially in arbitrary pixel shaders due to its sequential pixel dependency chain (pixel xn, yn usually requires computing errors for pixels xn-1, yn; xn, yn-1 etc.). Those are much better implemented as recursive filters on CPU or even in hardware. There are some hybrid algorithms that work in tiles, but then require compute shaders and more sophisticated engineering (~orders of magnitude slower and impossible to compute "in place").
While writing that blog post series I was working in video games industry and therefore focused on real-time scenarios and "tricks".