Skip to content

Transparency shader not working in v12 #1354

@CyberShadow

Description

@CyberShadow

Platform

NixOS

GPU, drivers, and screen setup

Intel Graphics on Linux v6.11.2, single monitor (laptop - Thinkpad X1 Extreme Gen3)

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) UHD Graphics (CML GT2) (0x9bc4)
    Version: 24.2.2
    Accelerated: yes
    Video memory: 15942MB
    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) UHD Graphics (CML GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.2
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 24.2.2
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 24.2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

i3 version 4.23

picom version

v12.2

Diagnostics
[ 2024-10-11 14:21:33.370 open_config_file_at WARN ] This compositor has been renamed to "picom", the old config file paths is deprecated. Please replace the "compton"s in the path with "picom"
**Version:** v12.2

### Extensions:

* Shape: Yes
* RandR: Yes
* Present: Present

### Misc:

* Use Overlay: No
  (Another compositor is already running)
* Config file specified: None
* Config file used: /home/vladimir/.config/compton.conf

### Drivers (inaccurate):

modesetting
[ 2024-10-11 14:21:33.416 egl_init WARN ] The egl backend is still experimental, use with care.

### Backend: egl

* Driver vendors:
 * EGL: Mesa Project
 * EGL driver: iris
 * GL: Intel
* GL renderer: Mesa Intel(R) UHD Graphics (CML GT2)

### Backend: glx

* Driver vendors:
 * GLX: Mesa Project and SGI
 * GL: Intel
* GL renderer: Mesa Intel(R) UHD Graphics (CML GT2)
* Accelerated: 1

Configuration:

Configuration file
backend = "glx";

rules: ({
  match = "class_g = 'Emacs'";
  shader = "compton/color-key-transparency-171925.glsl";
})

Steps of reproduction

  1. Create and set up a color-key transparency shader, e.g.:
    #version 330
    
    in vec2 texcoord;
    uniform sampler2D tex;
    
    vec4 window_shader() {
            vec4 c = texelFetch(tex, ivec2(texcoord), 0);
            {
                    if (c == vec4(23.0/255.0, 25.0/255.0, 37.0/255.0, 1.0)) // #171925
                            c = vec4(0, 0, 0, 0.7);
            }
            return c;
    }
  2. Set Emacs to use the same background color that the shader looks for (#171925), e.g. by activating the deeper-blue color theme
  3. Move the cursor around a bit

Expected behavior

Window background should be transparent, e.g.:

image

(screenshot taken with picom 11.2 with the equivalent config window-shader-fg-rule = [ "compton/color-key-transparency-171925.glsl:class_g = 'Emacs'" ];)

Current Behavior

Looks like the window contents is drawn on top of the previous copy repeatedly, instead of on the background, causing the window to be opaque and a ghosting effect, e.g.:

image

Stack trace

N/A

OpenGL trace

Let me know if you need this.

Other details

Hopefully the screenshots should be OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions