3 ms·
2D Radial blur is a separable filter [1], which means you can calculate it via first doing a 1D blur in one direction, and then using that intermediate result a
by bhouston 3y ago
2D Radial blur is a separable filter [1], which means you can calculate it via first doing a 1D blur in one direction, and then using that intermediate result and doing a 1D blur in the other direction and it is equivalent to doing a 2D radial blur.
Could one modify the stack blur algorithm to also operate in a separable fashion? It seems to me that one can combine Stack Blur with the separable concept to get the best of both worlds.
Of course traversing the data in a way not aligned with its in-memory data layout may cause issues, so one would have to figure out an efficient way to do that. I can think of a few ways of doing that using prefetching.
[1] https://en.wikipedia.org/wiki/Separable_filter https://en.wikipedia.org/wiki/Separable_filter
- mrob 3y agoIt's already implemented this way: https://melatonin.dev/blog/implementing-marios-stack-blur-15-times-in-cpp/#horizontal-and-vertical-stack-blur-passes https://melatonin.dev/blog/implementing-marios-stack-blur-15...