View Full Version : Improve particle engine

02-07-2005, 10:42 PM
I'm trying to do a particle engine and I wonder how to improve it. I try to use billboard face instead of point sprite and to use some glVertex3f(..) but performance are not so good than I expected. If someone have some ideas to improve particle engine, it would be very helpfull.
(Sorry for my bad english... I'm french)

02-08-2005, 12:13 AM
use a vertexprogram/shader to create the billboards.
there is a sample+code at delphi3d.net about it.
use vertex arrays/vbos for the vertexdata.

02-08-2005, 03:08 AM
But if i use vbo, I had to change the value of all vertex each frame, so are sure it make the particle engine faster. I renember that I've made a test few month ago, and I haven't see the difference between using glVertex and using vbo.
For the shader (for billboarding), don't you think that using SSE instruction for computing billboarding??

02-08-2005, 08:54 AM
I haven't see the difference between using glVertex and using vbo.
And you won't unless you are using a large number of triangles. Keep in mind though that immediate mode (glBegin/End, glVertex, etc) is the slowest way to render and is pretty much only good for test purposes.


02-08-2005, 09:40 AM
As your vertex data is changing each frame VBOs will perform no better than regular VARS (vertex arrays) since you're stuck with a data upload each frame.


do not render hundreds or thousands or particles using glVertex. As SirKnight said, the only reason to ever use immediate mode like that is for testing or trivially simple stuff like rendering a bounding box.

02-08-2005, 09:50 AM
the big killer of particle systems is usually heaps of overdraw of blended polygons, thus focusing on that is gonna typically help more than worrying about VBOs immediate etc
look into texture compression, different internal formats/formats, alpha testing on, maximizing used texture space per polygon etc

02-08-2005, 11:40 AM
So the best way is to use VARS and S3TC for texture? Ok, I will try to do so