#version 330 core

#define float2 vec2
#define float3 vec3
#define float4 vec4
in float2 texCoord;
in float4 vertexFragColor;
out float4 fragColor;
uniform sampler2D texture0;

void main()
{
   vec2 xy=texCoord;
   float blursize=10;
   float range=floor(blursize/1.2);
    vec4 color=vec4(0.);
    
    for(float a=-range;a<=range;++a)
    for(float b=-range;b<=range;++b)
      color+=texture(texture0,xy+vec2(a*.0025,b*.0025));
      //color=0.0001*color*pow(blursize,2.);
      color=color/pow(blursize,1.2);
      vec4 color2=texture(texture0,xy);
	
		  color=color*.25;
		  
		  
		  
	color.rgb=1.0*vec3(color2.a,color2.a,color2.a);
	color.a = color.a*.4 + color.r*.6;
	  fragColor=(color);  
       // fragColor=color2;
}

