Qt: Frosted glass effect causes double rendering
Due to usage of ShaderEffectSource
without hideSource
set, sourceItem
gets rendered two times. One in an offscreen surface, one in the main window. This behavior seems to be effectively doubling the batch count.
Usually this should not be a problem, however in our case, there are a high number of batches because of overlapping effects.
The solution is trivial: enable layering in the source item when the effect is active. This will eliminate rendering the second time in the main window, and will cause using the texture from the offscreen surface. This usually has a negative effect of having a huge size of texture to be rendered with blending, but I don't see a proper solution to this.