varying vec2 texCoord;
uniform sampler2D colorMap;
uniform sampler2D blurMap;

void main (void)
{

vec4 blurredpixel;
if (texCoord.y<1.0/3.0||texCoord.y>2.0/3.0)
	gl_FragColor = texture2D(blurMap, texCoord);
	//gl_FragColor = vec4(1.0f);
else
{
blurredpixel=vec4(0.0f,0.0f,0.0f,1.0f);
for (int x=-40;x<40;x+=3){
    for (int y=-40;y<40;y+=3){
        float x1=texCoord.x+(float)x/1920.0f;
        float y1=texCoord.y+(float)y/1080.0f;
        blurredpixel+=texture2D(colorMap, vec2(x1,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;//+blurredpixel/2.0f;
}
}
