Skip to content

qt: use "Dual Kawase" blur

This is the novel "Dual Kawase" blur that offers balanced quality & performance blur.

My finding is that the "Dual" approach was first introduced by Marius Bjorge (ARM) in SIGGRAPH 2015: https://community.arm.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-20-66/siggraph2015_2D00_mmg_2D00_marius_2D00_notes.pdf, which is inspired from the regular Kawase blur. There is also a detailed Intel document here: https://www.intel.com/content/www/us/en/developer/articles/technical/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms.html.

KWin and some other projects already started using it: https://phabricator.kde.org/D9848.

Now, it would not be fair to omit Qt 5's FastBlur (which eventually became integrated in Qt 6's MultiEffect) that we are using currently, because it does similar downscale/upscale (making use of bilinear filtering) with good enough quality. But it does not use the halfpixel trick, and does not work for textures in the atlas, or sub-textures.

I'm also researching Monte Carlo blur with temporal denoise approach (that is more ideal for static blur, such as player background, as we are limited by v-sync) My initial test with y=(1/x) for denoising seemed okay, but it needs more time and research if it is worth having it.

Draft because:

  • I suspect something may be wrong with premultiplied colors (because player background looked washed out sometimes). I will take a look again.
  • The effect seems too strong for artist top banner, even with the lowest radius.
  • Artist top banner needs layering when tiled. Qt's MultiEffect or FastBlur created implicit layer when necessary (https://github.com/qt/qtdeclarative/blob/6.8.3/src/effects/qgfxsourceproxy.cpp#L127), in this case we need to do it ourselves because this new blur is not going to create implicit layer for the source at all (this is intentional, layer.enabled or ShaderEffectSource can be used which is very trivial and always better than inferring whether a layer is necessary or not).

Merge request reports

Loading