//vertical gaussian blur
#version 120
varying vec2 texCoord;
uniform sampler2D colorMap;

void main (void)
{
    //const float gaussiancoef[11]= float[](0.000003,	0.000229,	0.005977,	0.060598,	0.24173,	0.382925,	0.24173,	0.060598,	0.005977,	0.000229,	0.000003);
    //const float gaussiancoef[11]= float[](0.0f,1.0f,2.0f,3.0f,4.0f,5.0f,4.0f,3.0f,2.0f,1.0f,0.0f);
    {
        vec4 blurredpixel=vec4(0.0f,0.0f,0.0f,1.0f);
        float x=texCoord.x;
        for (int y=0; y<10; y++)
        {
            float y1=texCoord.y+(-5.0f+y)/1080.0f;
            y1=clamp(y1,0.0f,1.0f-1/1080.0f);
            blurredpixel+=texture2D(colorMap, vec2(x,y1));
        }
//blurredpixel=blurredpixel/(20*20);
        //gl_FragColor = texture2D(colorMap, texCoord)+texture2D(blurMap, texCoord);
        //gl_FragColor = texture2D(blurMap, texCoord)+blurredpixel;//+blurredpixel/2.0f;
        gl_FragColor = blurredpixel/10.0f;//+blurredpixel/2.0f;
    }
}
