I’ve got a shader that renders particles using point sprites. I assign each sprite a size in the vertex shader by doing gl_PointSize = somevalue.
Everything runs well in a normal context, but when I use the same shader when rendering to an FBO, gl_PointSize is clamped to the 1…64 range (regardless of what I pass to glPointParameter (GL_POINT_SIZE_MAX).
Am I missing something?
Could this be a driver bug?
It’s not a driver bug.
If you have enabled both GL_POINT_SPRITE and GL_VERTEX_PROGRAM_POINT_SIZE, the point size is clamped to the implementation dependent point size range (Section 3.3 in the 2.1 spec).
You’ll have to disable GL_POINT_SPRITE and enable GL_VERTEX_PROGRAM_POINT_SIZE to avoid any clamping.