Skip to content
Snippets Groups Projects
Commit 988b7bb2 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qt: optimize the frosted glass effect by not using second pass layering

Currently layering (second pass) is used to render
the blurred source offscreen, and then apply the
rest of the effects (tint, exclusion and noise) to
the offscreen source when drawing the result in the
interface. Note that the first pass layering for the
source item is necessary for blurring and can not
be disabled.

This is not ideal, because layering requires
allocating resources for offscreen rendering.

The most ideal solution would be to modify
the fragment shader of the blur effect. But we
currently do not do run time shader compilation,
and MultiEffect does not accept overriding its
shader effect.

At the same time, FastBlur from Qt 5 Compat is
used as fallback when Qt Quick Effects is not
available. In a hypothetical scenario where we
could override the fragment shader, it would
mean that we would need to handle these two
cases differently because MultiEffect and
FastBlur use different shaders.

As a workaround, I propose having an underlay
filter rectangle that acts as exclusion (due
to opacity) and colorization (tint), and having
an overlay as the noise layer.
parent 0409b922
No related branches found
No related tags found
1 merge request!6477qt: optimize the frosted glass effect by not using second pass layering
Pipeline #544965 passed with stage
in 22 minutes and 33 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment