uniform vec2 invScreen;
uniform vec2 dir;

uniform sampler2D baseMap;
varying vec2 Texcoord;

void main(void)
{
   vec4 finalColor = vec4(0.0);
   vec2 d = dir * invScreen;
   
   int blur = 8;
   float sumTotal = 36.0;
   for (int i = 0; i < blur; i ++)
   {
		finalColor += texture2D( baseMap, Texcoord + d * i) * (blur - i);
		finalColor += texture2D( baseMap, Texcoord + d * (-i)) * (blur - i);
   }
   
   finalColor /= sumTotal;
 finalColor.a = 1.0;
   
   gl_FragColor = finalColor;
}