Particle Engine, Creating alot of Rain/Snow

Started by
11 comments, last by jefferytitan 11 years, 10 months ago
@DJNT: I am using point sprites (billboarding) each vertex contains one texture.
Advertisement
I personally use one vertex (containing initial position, velocity, gravity factors, acceleration, time-since-spawn, etc) with forward/left/up values as shader constants, combined with instancing - everything is computed on the GPU from there and up to 16384 (arbitrary choice) particles are drawn per draw-call. There's no need whatsoever for any matrix changes and it runs faster than a slippery snot on a slope. :)

Again - show some more code, and how many draw calls?

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I think the other posters are on the same page as me. You may be making savings on the CPU by using a single vertex, but you're punishing the GPU by making many separate draw calls. It would probably run better if you had 200 vertices but pushed them through in a single batch.

This topic is closed to new replies.

Advertisement