/usr/share/kwin/shaders/1.40/cube-cap.glsl is in kwin-data 4:5.5.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #version 140
uniform sampler2D sampler;
uniform vec4 u_capColor;
uniform float u_opacity;
uniform int u_mirror;
uniform int u_untextured;
in vec2 varyingTexCoords;
out vec4 fragColor;
vec2 mirrorTex(vec2 coords) {
vec2 mirrored = coords;
if (u_mirror != 0) {
mirrored.t = mirrored.t * (-1.0) + 1.0;
}
return mirrored;
}
void main() {
vec4 color = u_capColor;
vec2 texCoord = mirrorTex(varyingTexCoords);
vec4 tex = texture(sampler, texCoord);
if (texCoord.s < 0.0 || texCoord.s > 1.0 ||
texCoord.t < 0.0 || texCoord.t > 1.0 || u_untextured != 0) {
tex = u_capColor;
}
color.rgb = tex.rgb*tex.a + color.rgb*(1.0-tex.a);
color.a = u_opacity;
fragColor = color;
}
|