forked from yshui/picom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…oyed-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. (yshui#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. (yshui#193)
- Loading branch information
Showing
7 changed files
with
384 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
uniform float opacity; | ||
uniform bool invert_color; | ||
uniform sampler2D tex; | ||
|
||
void main() { | ||
vec4 c = texture2D(tex, gl_TexCoord[0]); | ||
{ | ||
// Change vec4(1.0, 1.0, 1.0, 1.0) to your desired color | ||
vec4 vdiff = abs(vec4(1.0, 1.0, 1.0, 1.0) - c); | ||
float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a); | ||
// Change 0.8 to your desired opacity | ||
if (diff < 0.001) | ||
c *= 0.8; | ||
} | ||
if (invert_color) | ||
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a); | ||
c *= opacity; | ||
gl_FragColor = c; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.