slint icon indicating copy to clipboard operation
slint copied to clipboard

Add first-class support for blurring what's underneath a Rectangle

Open tronical opened this issue 2 years ago • 5 comments

Similar to drop-shadow-* properties we should have blur-background-* properties (or similarly named), to apply a blur effect to what's underneath.

This is not quite a sub-tree effect but should apply to whatever was rendered "before". This is expensive in the implementation (so needs to be used sparingly), but in that shape it would be super convenient for designers (this issue is based on that feedback).

Connected conceptually to #612.

tronical avatar Jan 15 '23 08:01 tronical

any news about this?

chianti-ga avatar Aug 08 '23 15:08 chianti-ga

Unfortunately no news yet.

tronical avatar Aug 08 '23 18:08 tronical

We would like to have this at JTE for our front panel.

flukejones avatar Mar 02 '24 04:03 flukejones

What would it take to implement this feature? What sort of difficulty?

vgarleanu avatar Jun 06 '24 08:06 vgarleanu

If we say the this property applies to only what’s rendered exactly underneath the rectangle it’s used on, then I think this could be implemented by means of rendering the tree of items again starting at the root but (1) clipped to the rectangle and (2) not descending into the rectangle itself. This second pass would render into a layer and the blur would have to be applied there.

But I think this may the wrong approach.

Mayhe the existence of a blur in the tree means that we need to separate the scene into multiple layers (think multiple blurs) and the compose the layers accordingly. This avoids a double pass of the tree at the expense of more texture memory.

tronical avatar Jun 07 '24 19:06 tronical