point sprites vs. quads

First of all, I know I should read the spec, blah
blah, but I’m assuming someone probably already
knows the answer so I’m being lazy about it.

I have an old particle system rendered using
screen aligned quads. Do point sprites offer a
performance boost over using quads or are they
solely for the convenience of not having to
screen align the quads.

Thanks.

yes they should be quicker in theory sending 1 vert vs 4 verts.
but they do suffer from lots of problems
A/ most particle systems u want the particles to rotate so theyre useless for this
B/ if the center is off the screen the whole thing willl get clipped
C/ only on texture coordinate is generated for the pointsprite perhaps causing problems with fog etc
D/ theres also a maximum size they can be drawn at i think

Originally posted by zed:
yes they should be quicker in theory sending 1 vert vs 4 verts.
but they do suffer from lots of problems
A/ most particle systems u want the particles to rotate so theyre useless for this
B/ if the center is off the screen the whole thing willl get clipped
C/ only on texture coordinate is generated for the pointsprite perhaps causing problems with fog etc
D/ theres also a maximum size they can be drawn at i think

Most of these problems are solvable:

A: You can rotate the particle in a fragment program by rotating the texture sampling.

B: If the particles are small, which they generally are, this is not much of a problem.

C: I’m not sure what you mean with this.

D: See B.

/A.B.

ooof, B is pretty nasty. There’s no guarantee
my particles will be small enough to not cause
an eye sore by that.

So, I would see roughly a 75% performance gain
then?

Still, I suppose I can’t use them due to B.
Thanks a lot for the info, you saved me some time!

D) is pretty nasty too. It’s usually less than 64 pixels (63 on 6800gt), independent of screen resolution etc.

Btw. it’s worth noting (if not using point sprites) that element arrays of triangles are 50% faster than GL_QUADS on ati cards, while GL_QUADS are 50% faster than element arrays on nvidia cards… (you can probably use (a portion of) a static element array buffer).

doing the rotation in a vertex/fragment program sortta defeats the purpose of point sprites (ie send less data) if u also have to send rotation data as well per sprite.
further clarification over C
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=11;t=000595
this is important for certain types of fog and shadows

Originally posted by zed:
doing the rotation in a vertex/fragment program sortta defeats the purpose of point sprites (ie send less data) if u also have to send rotation data as well per sprite.
further clarification over C
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=11;t=000595
this is important for certain types of fog and shadows

Point sprites have a lot of limitations but I don’t think you make a valid point. If you want to rotate your point sprites per instance you’ll only have to add one extra float (the angle) to your point sprite vertex. Doing the particles as quads or pairs of triangles will require 4 or 6 times the original memory.

If you rotate all the sprites the same way it’s just an extra fragment shader constant.

If you can get away with point sprites (i.e. you have small particles), use them!

/A.B.