blob: c22081b47542e0b138fd5e2625d1e5fe7e82d591 (
plain)
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
|
#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);
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
float r,g,b;
float greenValue = (sin(texcoord.x) / 14.0) + 1.0;
r = 1.5 * c.r * greenValue;
g = 1.5 * c.g * greenValue;
b = 1.0 * c.b * greenValue;
c = vec4(r, g, b, c.a);
gl_FragColor = c;
return default_post_processing(c);
}
|