Skip to content

qt: do not use layering for source in PlayerBlurredBackground

Since Image is a texture provider, blur effect can take an Image as source directly, without relying on layering.

In this particular case though, the reason for layering was to decrease the coverage for the blur effect. The source texture can be as big as screen size / 2.7182, and blurring is not particularly cheap. With layering, the texture is scaled down to (512, 512) before fed into the blur effect.

However, we should probably not do that, because the quality also decreases which is noticeable when the interface is full screen and screen is high resolution. At the same time, if we don't scale the texture, we can use the source directly. In average case, going this way would increase quality; in the worst case, it would have the same quality as with scaled version because scaled version takes the same input texture. In that case, the main difference is instead of ShaderEffectSource doing linear filtering, blur effect would do that which yields practically the same result.

Currently, even if we are not blurring the source texture directly (before scaling down), we still need to render the source texture into offscreen surface in order to scale it down. This is not free, and also requires allocating resources for offscreen rendering.

Request review @chub.

Merge request reports

Loading