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

uniform float sampleWidth;

// TODO: abuse bilinear filtering in y-dir

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



//vec3 f = texture2D(sourceTexture, vtc).xyz;

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


gl_FragColor*=0.520081;


//float l = length(f);
//gl_FragColor*=l;

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

gl_FragColor*=1.0/67.0;*/

}