PDA

View Full Version : Point Sprites distance attenuation problem GLSL



Snuffe
01-18-2005, 02:13 PM
I have distance attenuation that works fine, as long as I do not use a shader(A vertex/fragment combo).
When I activate the shader (some colouring, displacement, nothing fancy.) all points are displayed the same size. Why? And what can be done about it?

jra101
01-18-2005, 02:26 PM
Are you writing to gl_PointSize in your vertex shader? If so you need to call glEnable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB).

thinks
01-18-2005, 10:02 PM
check the uniform variable gl_Point. this is a struct which contains stuff about distance attenuation.