picom icon indicating copy to clipboard operation
picom copied to clipboard

blur adds unexpected shadow

Open x70b1 opened this issue 2 years ago • 6 comments

Platform

Arch Linux

GPU, drivers, and screen setup

GPU: Intel Iris Plus mesa: 21.2.5-1 xf86-video-intel: 1:2.99.917+916+g31486f40-2

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2) (0x8a52)
    Version: 21.2.5
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

i3-gaps polybar alacritty

picom version

Version: vgit-31e58 build from picom-git

Diagnostics
picom --experimental-backends --diagnostics --config ../.config/picom/config

### Extensions:

* Shape: Yes
* XRandR: Yes
* Present: Present

### Misc:

* Use Overlay: Yes
* Config file used: ../.config/picom/config

### Drivers (inaccurate):

Intel

### Backend: glx

* Driver vendors:
 * GLX: Mesa Project and SGI
 * GL: Intel
* GL renderer: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2)
* Accelerated: 1

Configuration:

Configuration file
backend = "glx";
vsync = true;

shadow = true;
shadow-radius = 6;
shadow-offset-x = -8;
shadow-offset-y = -8;
shadow-opacity = 0.30;

shadow-exclude = [
    "window_type = 'dock'",
    "window_type = 'normal'",
    "window_type = 'desktop'"
];

blur-method = "dual_kawase";
blur-strength = 2;

fading = false;

wintypes:
{
    tooltip =
    {
        fade = true;
        shadow = false;
        opacity = 0.85;
        focus = true;
    };
};

Behavior

If I use my config with blur, picom renders some "shadows" behind my alacritty windows. Is there something known that could cause this?

I used a white background to make it visible. After disabling blur, the shadow is away. The issue https://github.com/yshui/picom/issues/673 seems to be similar but this should be already fixed.

2021-11-25-15:21:02-screenshot

x70b1 avatar Nov 25 '21 20:11 x70b1

I'm not sure if I can follow you, but the blur takes into account a larger region than the window to minimize rapid color changes at the edges of a window when the background changes (see https://github.com/yshui/picom/issues/596#issuecomment-786553426 and https://github.com/yshui/picom/pull/382#issuecomment-617930559 for more details). This might be related to the behaviour you are seeing. Does the shadow disappear when the windows are further apart?

tryone144 avatar Nov 25 '21 20:11 tryone144

@tryone144 Thanks for your response!

This screenshot https://github.com/yshui/picom/pull/382#issuecomment-617861085 seems to be the same what I can see. Your answer clears the situation. I found now some other issues which point to the same direction, like https://github.com/tryone144/compton/issues/26. So it seems like this is a common wish for the new dual_kawase blur.

My goal is to have a uniform area like this:

2021-11-25-23:16:29-screenshot

In picom 8.2 I was able to achieve this just with the following configs:

blur-background = true;
blur-kern = "7x7box";

I can still use it without adding --experimental-backends. But it seems to be a bit slower.

The option --transparent-clipping was mentioned. But it seems not to solve something. Should this acually work here?

x70b1 avatar Nov 25 '21 22:11 x70b1

The option --transparent-clipping was mentioned. But it seems not to solve something. Should this acually work here?

--transparent-clipping might be used as a workaround, as it does not take windows in the background into account for blurring. However, the required changes mentioned in the other issue are not yet resolved.

A more proper solution would be to specify such an option for individual windows (such as docks}, which is not possible at the moment. If this could then be set only for non-floating windows depends on the window status (i.e. if picom can identify such windows).

tryone144 avatar Nov 25 '21 22:11 tryone144

Alright, thanks for this @tryone144!

Then you can close this issue if you want, or keep it as reminder. Thanks for your help!

x70b1 avatar Nov 25 '21 22:11 x70b1

@tryone144 The experimental backends are stable now. Are there plans to make the old behavior working again?

x70b1 avatar Aug 22 '22 21:08 x70b1

With the new release glx needs to run with --legacy-backends.

It seems like a lot of issues are fixable with --transparent-clipping and the newer --transparent-clipping-exclude=. Unfortunately I have not found a way to resolve this issue with it.

x70b1 avatar Oct 30 '22 22:10 x70b1