Is point sprites a myth ?

So I needed to render a lot of simple primitives very fast and I implemented them as point sprites. Everything was flying real fast when a guy from QC department reported that it does not work as expected on some ATI cards. The reason appeared to be quite legitimate although annoying. The points maximum size is not mandated by Open GL. The only guarantee is that point size = 1 always exists evertthig lower and higher is up to the graphics driver developer. ATI Radeon 4650 with my current driver allows points of up to 64 which means the point sprite cannot be bigger than that.
If I am not missing something that in turns means that Point Sprites algorythm is nothing more than a hobby tool that cannot be used in a production environment.
( But why on Earth one would want to limit the maximum point size ?)

If I am not missing something that in turns means that Point Sprites algorythm is nothing more than a hobby tool that cannot be used in a production environment.

It depends on what you want them for. If you’re expecting them to be a general-purpose replacement for quads, then yes, it’s not going to work out the way you want. But if you can live within the general limitations for them (which admittedly, 64 pixels covered a lot more of the screen when 1024x768 was considered high resolution), then it can work reasonably well for you.

But why on Earth one would want to limit the maximum point size ?

Hardware limitations. Point sprites are a hardware feature. As such, there is some hardware that governs their functionality. The size register or whatever would naturally have some maximum size.

Are you doing glEnable( GL_VERTEX_PROGRAM_POINT_SIZE ) and then setting gl_PointSize in the vertex shader?

Past threads have indicated low limits if you used the FFP point size, but not so with vertex shader point size, on NVidia. I wonder if the same might also be true for ATI… (?)

If you still hit limits on ATI, then you can always drop back and use full QUADS, or use a geometry shader to build QUADS from POINTS.

I am surprised about the value of 64 for max point size; I would have expected a value of 8192. can you double check with gpu caps viewer and give a screenshot ?

thanks,

can you double check with gpu caps viewer and give a screenshot ?

I can. My HD 3300 with the 9.12 drivers gives the same answer

I use points and geometry shaders as a replacement for Point Sprites in these cases, as Dark Photon suggests.

You’ve also got to remember that point sprites are clipped as a point, so once the centre point goes off-screen, the whole point sprite will vanish. With larger point sprites this is much more noticable.

we will look into the caps view screenshot, but it looks completely wrong to me.

I was expecting that smooth points were limited to 63, but aliased points should be limited to screen size (8k).
as well, max light source should be 8, and display list nesting should be 64 …

PS: I suspect that the caps viewer is creating a context without those functionalities. the “max stack depth” section is wrong too

… if you go to “rendering test”, then select an older context (i.e. not 3.2 FC), and go back to take the screenshot, then you should see the values I mentionned.

if you go to “rendering test”, then select an older context (i.e. not 3.2 FC), and go back to take the screenshot, then you should see the values I mentionned.

So, what does this mean for 3.2 core?

Yeah, I think this is per-spec behavior. But I’ve always wondered why it’d spec such nondesirable behavior. I wouldn’t mind seeing the spec changed here.

Incidentally, NVidia doesn’t follow the spec on this and the point sprite is clipped as a quad like you’d wish it were. Dunno what AMD/Intel do here…

But I’ve always wondered why it’d spec such nondesirable behavior.

Because point sprites are a hardware feature. And that’s how the hardware worked when it was first introduced.

Incidentally, NVidia doesn’t follow the spec on this and the point sprite is clipped as a quad like you’d wish it were.

It depends on how you use them. If you use fixed-function T&L, then they get clipped like points (and they obey the point-sprite size limits). If you use shaders to define your point sprite size, then they’re basically quads.

the max point size should still be 8k (like in older context); there is no smooth point there, so the old limit of 63 does not exist.