1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-10-13 05:16:09 -04:00
picom/compton-default-fshader-win.glsl
Richard Grenville 81c677f28b Feature: #183 custom window shader & #193 --no-fading-destroyed-argb
- Add --glx-fshader-win, which specifies a custom fragment shader for
  painting windows. compton-default-fshader-win.glsl is the shader with
  default behavior, and compton-fake-transparency-fshader-win.glsl
  provides a template of fake transparency. (#183)

- Add --force-win-blend to force all windows to be painted with
  blending.

- Add --no-fading-destroyed-argb, as a workaround of bugs in some WMs.
  (#193)
2014-05-16 15:18:17 +08:00

11 lines
233 B
GLSL

uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;
void main() {
vec4 c = texture2D(tex, gl_TexCoord[0]);
if (invert_color)
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
c *= opacity;
gl_FragColor = c;
}