Order independent transparency in particle system

Posted by Stepan Zastupov on Game Development See other posts from Game Development or by Stepan Zastupov
Published on 2011-03-07T14:56:01Z Indexed on 2011/03/07 16:19 UTC
Read the original article Hit count: 308

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because:

  • Each particle is a point sprite in a single mesh and I can't use scene graph ability to sort transparent nodes. The system node should be properly sorted, though.
  • Particle position is computed on shader from initial velocity, acceleration and time. In order to sort the system I would have to perform all this computations on CPU, which is something I want to avoid.
  • Sorting hundreds of particles against camera position and uploading it on GPU each frame seams to be quiet heavy operation.

Alpha testing seems to be fast enough on GLES 2.0 and works fine for non-transparent but "masked" textures. Still, it's not enough for semi-transparent particles.

How would you handle this?

© Game Development or respective owner

Related posts about opengl

Related posts about opengl-es