wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Shadows are also blurred by the blur plugin

Open tsujan opened this issue 3 years ago • 1 comments

When the blur effect is enabled, the shadows are also blurred.

I first saw that after installing wayfire-shadows, but to make sure that it wasn't related to that third-party plugin, I installed the GTK4 app "Celluloid" and saw it even more clearly.

To Reproduce

  1. Enable the blur effect (I use the Kawase method).
  2. Install a GTK app.
  3. See the shadow blurring with that app, as in the following screenshot.

Screenshot I used two backgrounds with a hight contrast to show the problem clearly. The dark window at the top is that of Celluloid.

blur

Wayfire version wayfire-0.7.4 (latest release)

tsujan avatar Sep 02 '22 23:09 tsujan

GTK apps probably do not tell the window compositor which parts of the app are shadows and which are transparent glassy parts, so it is impossible to separate them without additional protocols.

With the shadow plugin the shadow is in a separate subsurface. The problem is that currently blur is applied after all subsurfaces have been composited to one image, so it cannot separate the app from the shadows anymore. This could be fixed by applying blur only to some of the subsurfaces before compositing with the rest, which requires some way to communicate this between the two possibly independent shadow and blur plugins and the compositor. If you add wobbly to this it might become quite hard to manage the order in which things have to be rendered (although certainly still technically feasible). I believe the compositing API would need to be significantly more complex if this should be supported correctly while maintaining the modularity of the plugins.

timgott avatar Sep 05 '22 13:09 timgott