I have read here that particles can’t have depth in babylon, but then it is a bit old and particle systems have a forceDepthWrite property so I want to ask: is there a way to write particles to the depth buffer using modern babylonjs?
Here is a PG with particles and a depth buffer:
If it is not possible, then is it possible to render particles after postprocesses (yeah that sounds silly I know)?
That would work yes, but simple particle systems have a lot of functionnality built in such as individual velocities, directions and colors that would take quite a lot of effort to reproduce using an SPS
And also SPS are not designed to update the position of hundreds of particles every frame, this would tank the performance.
If there is an alternative, I am very much interested!
Try searching the playgrounds here Playground search page | Babylon.js Documentation . Search indexing isnt great, but try searching for exact class or function names you’re interested in, i can remember many good examples for what youre trying to do.
Okay I managed to make something very decent using the SPS, and the performance is quite better than what I expected The playground helped a lot indeed!
here is the original with simple particle systems for comparison: