
#version 150

out vec3 c;
uniform float visibility;
uniform float red;
uniform float green;
uniform float blue;
in float size;


void main(void)
{
	c = (
		max(0.0, 1.0f-pow(2.0*sqrt(
			dot(
				gl_PointCoord.xy-vec2(0.5,0.5),
				gl_PointCoord.xy-vec2(0.5,0.5)
				)
			)
		,13.0))
	)*vec3(red,green,blue)*visibility*sqrt(size*0.5f);
}
