
#version 120
uniform float particle_size;
void main()
{
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
  vec4 eye = gl_ModelViewMatrix * gl_Vertex; 
  float d = length(eye);
  gl_PointSize = particle_size * 1.0/(0.0 + 0.08*d + 0.001*d*d);       
  gl_FrontColor = gl_Color;
}
