stk-code_catmod/data/shaders/gaussian6h.frag
vincentlj 2ba340b6cb OGL32CTX: Add vertex shader where default one was assumed.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14973 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-08 23:11:10 +00:00

25 lines
654 B
GLSL

#version 130
uniform sampler2D tex;
uniform vec2 pixel;
// Gaussian separated blur with radius 6.
in vec2 uv;
void main()
{
vec4 sum = vec4(0.0);
float X = uv.x;
float Y = uv.y;
sum += texture2D(tex, vec2(X - 5.13333 * pixel.x, Y)) * 0.00640869;
sum += texture2D(tex, vec2(X - 3.26667 * pixel.x, Y)) * 0.083313;
sum += texture2D(tex, vec2(X - 1.4 * pixel.x, Y)) * 0.305481;
sum += texture2D(tex, vec2(X, Y)) * 0.209473;
sum += texture2D(tex, vec2(X + 1.4 * pixel.x, Y)) * 0.305481;
sum += texture2D(tex, vec2(X + 3.26667 * pixel.x, Y)) * 0.083313;
sum += texture2D(tex, vec2(X + 5.13333 * pixel.x, Y)) * 0.00640869;
gl_FragColor = sum;
}