#version 430 core
layout (points) in;
layout (triangle_strip, max_vertices = 4) out;
in vec4 vColor [];
in float vRad [];
uniform vec2 winSize;
out vec4 gColor;
out float gRad;
out vec2 cenPosTrans;
void main()
{
  vec3 cenPos = gl_in[0].gl_Position.xyz;
  vec2 cenPosa = cenPos.xy + vec2 (1,1);
  cenPosTrans = vec2 (cenPosa * winSize * 0.5);
  gColor = vColor[0];
  gRad = vRad[0];

  gl_Position = vec4 (cenPos.x + gRad/winSize.x, cenPos.y + gRad/winSize.y, cenPos.z , 1);
  EmitVertex();
  gl_Position = vec4 (cenPos.x - gRad/winSize.x, cenPos.y + gRad/winSize.y, cenPos.z , 1);
  EmitVertex();
  gl_Position = vec4 (cenPos.x + gRad/winSize.x, cenPos.y - gRad/winSize.y, cenPos.z , 1);
  EmitVertex();
  gl_Position = vec4 (cenPos.x - gRad/winSize.x, cenPos.y - gRad/winSize.y, cenPos.z , 1);
  EmitVertex();


  EndPrimitive();

}
