Warning, /plasma/kwin/src/plugins/blur/shaders/upsample.frag is written in an unsupported language. File is not indexed.

0001 uniform sampler2D texUnit;
0002 uniform float offset;
0003 uniform vec2 halfpixel;
0004 
0005 varying vec2 uv;
0006 
0007 void main(void)
0008 {
0009     vec4 sum = texture2D(texUnit, uv + vec2(-halfpixel.x * 2.0, 0.0) * offset);
0010     sum += texture2D(texUnit, uv + vec2(-halfpixel.x, halfpixel.y) * offset) * 2.0;
0011     sum += texture2D(texUnit, uv + vec2(0.0, halfpixel.y * 2.0) * offset);
0012     sum += texture2D(texUnit, uv + vec2(halfpixel.x, halfpixel.y) * offset) * 2.0;
0013     sum += texture2D(texUnit, uv + vec2(halfpixel.x * 2.0, 0.0) * offset);
0014     sum += texture2D(texUnit, uv + vec2(halfpixel.x, -halfpixel.y) * offset) * 2.0;
0015     sum += texture2D(texUnit, uv + vec2(0.0, -halfpixel.y * 2.0) * offset);
0016     sum += texture2D(texUnit, uv + vec2(-halfpixel.x, -halfpixel.y) * offset) * 2.0;
0017 
0018     gl_FragColor = sum / 12.0;
0019 }