kwin/effects/taskbarthumbnail/fragment.glsl
Fredrik Höglund cbb4248a2a Use a high quality lanczos filter to scale the window thumbnails when
GLSL shaders are supported.

Currently disabled when the NVIDIA driver is used because of a driver
issue that will need to be worked around.

svn path=/trunk/KDE/kdebase/workspace/; revision=1125672
2010-05-11 22:05:00 +00:00

15 lines
421 B
GLSL

uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;
void main(void)
{
vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0];
for (int i = 1; i < kernelSize; i++) {
sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i];
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i];
}
gl_FragColor = sum;
}