5899a26aad
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14590 178a84e3-b1eb-0310-8ba1-8eac791a3b58
20 lines
510 B
GLSL
20 lines
510 B
GLSL
uniform sampler2D tex;
|
|
uniform vec2 pixel;
|
|
|
|
// Gaussian separated blur with radius 3.
|
|
|
|
void main()
|
|
{
|
|
vec4 sum = vec4(0.0);
|
|
float X = gl_TexCoord[0].x;
|
|
float Y = gl_TexCoord[0].y;
|
|
|
|
sum += texture2D(tex, vec2(X - 3.0 * pixel.x, Y)) * 0.03125;
|
|
sum += texture2D(tex, vec2(X - 1.3333 * pixel.x, Y)) * 0.328125;
|
|
sum += texture2D(tex, vec2(X, Y)) * 0.273438;
|
|
sum += texture2D(tex, vec2(X + 1.3333 * pixel.x, Y)) * 0.328125;
|
|
sum += texture2D(tex, vec2(X + 3.0 * pixel.x, Y)) * 0.03125;
|
|
|
|
gl_FragColor = sum;
|
|
}
|