Warning, /plasma/kwin/src/plugins/blur/shaders/downsample_core.frag is written in an unsupported language. File is not indexed.
0001 #version 140
0002
0003 uniform sampler2D texUnit;
0004 uniform float offset;
0005 uniform vec2 halfpixel;
0006
0007 in vec2 uv;
0008
0009 out vec4 fragColor;
0010
0011 void main(void)
0012 {
0013 vec4 sum = texture(texUnit, uv) * 4.0;
0014 sum += texture(texUnit, uv - halfpixel.xy * offset);
0015 sum += texture(texUnit, uv + halfpixel.xy * offset);
0016 sum += texture(texUnit, uv + vec2(halfpixel.x, -halfpixel.y) * offset);
0017 sum += texture(texUnit, uv - vec2(halfpixel.x, -halfpixel.y) * offset);
0018
0019 fragColor = sum / 8.0;
0020 }