I am working on a particle system, and of course I would like my point sprites to be smaller if they are farther away from the camera.
This works well if I use the fixed pipeline, but if I use a GLSL shader, it doesn’t. All point sprites are the same size.
There is not a lot of info on the net about this, the only thing I could find was to enable GL_VERTEX_PROGRAM_POINT_SIZE. But it did not change anything, size is still constant. Can someone tell me how to achieve this in a shader?