Original Post
hi! I recently started investigating on doing particle systems on GPU. As far as i could find, the biggest limitation is that for some effects such as smoke, particles need to be sorted by depth. I looked for ways around this, and i could only find 1) Bitonic merge sort - this algorithm seems to be the fastest way to do sorts on GPU, however it's still considerably very costly for large amount of elements. It seems to be recommended to do it incrementally but so far and even for not so fast emitting particle systems, it doesn't look it can keep the system sorted very well. 2) Use an accumulation buffer and divide (color/alpha_accum)/accum, which is an approximation but looks allright - this seems really fast but quite demanding on video ram and won't discriminate between a small or fullscreen particle effect. 3) Apply some sort of noise to alpha - this seems to work great for grass, though doesn't seem to work so great for smoke. So, what are your experiences with this? So far it seems the only way i could find was OpenCL/Compute which allow for scattered writes (thus, using other kind of algorithms).. but that won't work on older cards..