Hey guys
Last weekend I made a small particle system that runs fully on the GPU in Unity, there are only a few features at the moment, but I thought it’d be a great experience to try to build something with it while adding new stuff at the same time! ( what could go wrong? )
Here are already a few updates on the past couple of days…
What I got over the weekend, here simulating around 10k particles I think, I can push it to 1M easily but you start to wonder why the heck would you need that many particles.
I’m making a single draw call using DrawProcedural, specifying how many verts I want, then in the shader I recreate the billboards using a geometry shader. I still have to try using a DrawInstancedIndirect and feeding it a quad mesh directly, it might be faster than a GS.
This is what I came up with yesterday. The particles are updated in a compute shader so I have access to the other particles of the buffer while I’m updating one. Here I check the whole buffer to find the closest points to each particle, and then build extra quads for each connection to the closest, the same way I build the billboard quad in the geometry shader. If there are enough neighbors around I also build an extra triangle using the particle position and two close neighbors positions.
Next step is to combine multiple emitters and try to make something cool with it