uniform sampler2D textureIdX; // the texture with the scene you want to blur
uniform float blurSizeX; // 1.0/512.0;

varying vec2 texture_coordinate;
 
void main(void)
{
   vec4 sum = vec4(0.0, 0.0, 0.0, 1.0);
 
   // blur in y (vertical)
   // take nine samples, with the distance blurSizeX between them
   sum += texture2D(textureIdX, vec2(texture_coordinate.x - 4.0*blurSizeX, texture_coordinate.y)) * 0.05;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x - 3.0*blurSizeX, texture_coordinate.y)) * 0.09;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x - 2.0*blurSizeX, texture_coordinate.y)) * 0.12;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x - blurSizeX, texture_coordinate.y)) * 0.15;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x, texture_coordinate.y)) * 0.16;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x + blurSizeX, texture_coordinate.y)) * 0.15;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x + 2.0*blurSizeX, texture_coordinate.y)) * 0.12;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x + 3.0*blurSizeX, texture_coordinate.y)) * 0.09;
   sum += texture2D(textureIdX, vec2(texture_coordinate.x + 4.0*blurSizeX, texture_coordinate.y)) * 0.05;
 
   gl_FragColor = sum;
}