Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shaders not being applied #1312

Closed
ikz87 opened this issue Aug 12, 2024 · 2 comments
Closed

Shaders not being applied #1312

ikz87 opened this issue Aug 12, 2024 · 2 comments

Comments

@ikz87
Copy link

ikz87 commented Aug 12, 2024

Platform

GPU, drivers, and screen setup

Intel integrated graphics (core i3 10th gen), one monitor (laptop).
xf86-video-vesa 2.6.0-2

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 (ICL GT1) (0x8a56)
Version: 24.1.2
Accelerated: yes
Video memory: 3750MB
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 (ICL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.2-arch1.1
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.1.2-arch1.1
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.1.2-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

picom version

Diagnostics

Version: vgit-f9777

Extensions:

  • Shape: Yes
  • RandR: Yes
  • Present: Present

Misc:

  • Use Overlay: No

  • Config file specified: /home/kz87/sample_picom.conf

  • Config file used: /home/kz87/sample_picom.conf

Drivers (inaccurate):

Intel
[ 08/12/2024 13:39:07.880 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 (ICL GT1)

Backend: glx

  • Driver vendors:
  • GLX: Mesa Project and SGI
  • GL: Intel
  • GL renderer: Mesa Intel(R) UHD Graphics (ICL GT1)
  • Accelerated: 1

Configuration:

Configuration file
// Paste your configuration here
backend = "glx"
corner-radius = 20

rules: ({
  match = "focused";
  shader = "/home/kz87/Code/picom-shaders/default.glsl";
  corner-radius = 1;
})


Steps of reproduction

  1. Make .glsl file with the following code:
#version 330
in vec2 texcoord;             // texture coordinate of the fragment

uniform sampler2D tex;        // texture of the window

// Default window post-processing:
// 1) invert color
// 2) opacity / transparency
// 3) max-brightness clamping
// 4) rounded corners
vec4 default_post_processing(vec4 c);

// Default window shader:
// 1) fetch the specified pixel
// 2) apply default post-processing
vec4 window_shader() {
    vec2 texsize = textureSize(tex, 0);
    vec4 c = texture2D(tex, texcoord / texsize, 0);
    c = default_post_processing(c);
    c.xyz *= 0;
    return c;
}
  1. Run picom and specify shader path through the config file provided above

Expected behavior

Almost all windows should have corner-radius of 20 and no shader, except the focused one, which should have corner-radius of 1 and be completely black

Current Behavior

The corner-radius of the focused window does change, but the shader isn't applied

Other details

2024-08-12.13-45-57.mp4
@yshui yshui closed this as completed in d096a45 Aug 13, 2024
@yshui yshui reopened this Aug 13, 2024
@yshui
Copy link
Owner

yshui commented Aug 13, 2024

Sorry, closed the wrong issue

@yshui
Copy link
Owner

yshui commented Aug 13, 2024

Not just shader in the new rules... It was broken everywhere actually. Should be fixed now.

@yshui yshui closed this as completed in fda04bd Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants