-
Notifications
You must be signed in to change notification settings - Fork 6
How to use
You can run any of these shaders in one of two ways.
By running:
picom --no-use-damage --window-shader-fg <path_to_shader>
The shader in path_to_shader
will apply to all windows. Use this to quickly test out shaders and see how they look like
In your config file, you can enable shaders for all windows (like when using the command line) by searching for the following setting:
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
window-shader-fg = "default";
And changing default for the absolute path of the shader you want to use.
But the best way to implement shaders is by setting them for specific windows. Append the following to your config file:
window-shader-fg-rule = [
"<absolute_path_to_shader>:class_g = '<window_class>'",
];
Then the shader at <absolute_path_to_shader>
will be applied to all windows with class <window_class>
.
Add as many rules as you want.
Picom changed the way shaders are applied to windows quite some time ago (see this commit). This repo uses the updated shader format, meaning that, for any picom fork that is outdated enough to be using the old format, none of these shaders will work.
The shaders only update when the window's content updates, meaning that any shaders that rely on constantly updating values (like the ones from the 3DCamera section) should be run on windows that update constantly (like a video player) to actually look good. This limitation can kinda be circumvented by having a different window update its contents in the same workspace as the window we are applying the shader to, but for that you need to have use of damage disabled (notice how we use --no-use-damage
in the first section of this page).
For picom forks that implement animations (like FT-Labs) I've noticed that shaders aren't applied while animations are taking place.