uniform sampler2D textureIdY; // this should hold the texture rendered by the horizontal blur pass
uniform float blurSizeY;

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 blurSizeY between them
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y - 4.0*blurSizeY)) * 0.05;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y - 3.0*blurSizeY)) * 0.09;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y - 2.0*blurSizeY)) * 0.12;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y - blurSizeY)) * 0.15;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y)) * 0.16;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y + blurSizeY)) * 0.15;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y + 2.0*blurSizeY)) * 0.12;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y + 3.0*blurSizeY)) * 0.09;
   sum += texture2D(textureIdY, vec2(texture_coordinate.x, texture_coordinate.y + 4.0*blurSizeY)) * 0.05;
 
   gl_FragColor = sum;
}