This is all I found:
When the patch is adapted for use with Shell, outset shadows and most corners with big radii are distorted. Only the corners of those actors that correspond to panelmode=0 are OK.
With some changes, all shadows will be OK but none of curved corners. Your method of detecting transparent pixels doesn't work with most widgets in Shell. I removed it to have correct shadows without having highly curved corners. I couldn't find a fully working way for the detection of transparent pixels.
On the other hand, there's no hope for making the backgrounds of translucent non-Shell widgets blurred in this way.
Let's look forward to an implementation of opacity blurring in Clutter itself. It seems buggy for now, so we might have to wait a long time.
Thanks again for sharing your nice experiment
I'm sorry to hear it didn't work for Shell but, well... it was never meant for Shell but for Cinnamon.
The method we use to detect transparent pixels is no mistery at all: in the second pass
pipeline we attach a texture with the "flattened" actor to layer 1
. Then we sample that texture (using the FrontTex Sampler2D
in that pipeline's Cogl snippet) and we check if the alpha value of each texel is below 0.004 (<1/256). If so, we have a fully transparent texel in layer 1
and we avoid painting the corresponding texel of the texture in layer 0
(the actual blurry background). That way the texture in layer 1
works as a "mask" for the texture in layer 0
: we only paint those parts of the blurry background that corresponds with non fully transparent parts of the actor.
As for Clutter to include opacity blurring as a new effect... it seems highly improbable. Clutter already provides an API to create that kind of effects (http://developer.gnome.org/clutter/stable/ch06.html
) so the answer of any Clutter developer when asked for such thing is very comprehensible: "We gave you the tools, we explained you how to use them, now do it yourself!".