Blur shader improvements
The current blur shaders for the OpenGL and Vulkan GSK renderers are far from optimal (especially for large radii).
Here are some possible improvements:
- Separate the horizontal and the vertical pass.
- Use linear filtering to reduce the number of texture lookups.
- Calculate the gauss coefficient incrementally (see GPU Gems 3, chapter 40).
- Handle large radii by downscaling, blurring and then scaling up again.
- Use a (dual) Kawase filter (see SIGGRAPH 2015, Bandwidth-Efficient Rendering by Marius Bjørge).
This blog post and this presentation give a nice overview on GPU-based blur algorithms.
Possibly relevant:
https://phabricator.kde.org/D9848
https://github.com/elementary/gala/pull/224
https://github.com/servo/webrender/pull/1716
https://github.com/servo/webrender/pull/1961
https://github.com/servo/webrender/issues/2821
Edited by eyelash