#version 430 core
in vec2 cenPosT;
in vec2 gParams;
out vec4 fColor;

void main()
{
  vec2 pos = gl_FragCoord.xy;
  float dist = min(1 , 2*distance(pos,cenPosT) / (gParams.x));
  //float c = pow(gParams.y*dist,2);
  float c = gParams.y * pow(1-dist,2);
  //float c = gParams.y;
  fColor = vec4( c,c,c ,c  );
//  fColor = vec4( 1,0,0 ,  1);
//  fColor = vec4( 1,0,0 , pow(dist,2) );
}
