varying vec2 vtc;
uniform sampler2D sourceTexture;
uniform float height;

uniform float sampleWidth;

void main(void)
{
float step=sampleWidth/height;
float halfstep=step/2.0;

gl_FragColor  = texture2D(sourceTexture, vtc)*0.3;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step))*0.294060;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step))*0.294060;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*2.0))*0.276935;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*2.0))*0.276935;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*3.0))*0.250581;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*3.0))*0.250581;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*4.0))*0.217845;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*4.0))*0.217845;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*5.0))*0.181959;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*5.0))*0.181959;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*6.0))*0.146026;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*6.0))*0.146026;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*7.0))*0.112593;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*7.0))*0.112593;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*8.0))*0.083411;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*8.0))*0.083411;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0.0,step*9.0))*0.059370;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0.0,step*9.0))*0.059370;

gl_FragColor*=0.520081;

//vec3 texel = texture2D(sourceTexture, vtc).rgb;

gl_FragColor.a = 1.0; // 0.2 + 0.6*beat;

//gl_FragColor*= length( texture2D(sourceTexture, vtc) );
//gl_FragColor*= (0.25 +(texel.x + texel.y + texel.z)/8.0);

//gl_FragColor.a=1.0;
/*

Gaussian filter at 0: 0.300000
Gaussian filter at 1: 0.294060
Gaussian filter at 2: 0.276935
Gaussian filter at 3: 0.250581
Gaussian filter at 4: 0.217845
Gaussian filter at 5: 0.181959
Gaussian filter at 6: 0.146026
Gaussian filter at 7: 0.112593
Gaussian filter at 8: 0.083411
Gaussian filter at 9: 0.059370



gl_FragColor  = texture2D(sourceTexture, vtc)*15.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step+halfstep))*10.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step+halfstep))*10.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step*2.0+halfstep))*6.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step*2.0+halfstep))*6.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step*3.0+halfstep))*4.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step*3.0+halfstep))*4.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step*4.0+halfstep))*3.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step*4.0+halfstep))*3.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step*5.0+halfstep))*2.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step*5.0+halfstep))*2.0;
gl_FragColor += texture2D(sourceTexture, vtc+vec2(0,step*6.0+halfstep))*1.0;
gl_FragColor += texture2D(sourceTexture, vtc-vec2(0,step*6.0+halfstep))*1.0;
gl_FragColor*=1.0/67.0;
*/
}
