Here is a short demo of an accelerated GPU Particle System for Unity.
SCREEN SPACE RENDERING
I found many techniques on the web but here is the document from Nvidia that brought me light on this subject. Based on it, I created all the rendering steps (point sprite, depth to normal, blurring, bilateral filter…). Caustics render pass isn’t done at this stage and the physics kernels have to be refactored.
Particles aren’t interacting each other but only interacting with the collision data buffer from the scene.
- Emitter rate and radius
- Forces and angular forces
- Size over time
- Particle Age
- Enable/Disable gravity (values from the Unity physic engine)
- Noise on velocities
- Change color over time
- Bounce and impact parameters
- Soft particles rendering
- GPU Collision Detection based on Unity colliders (bufferize scene colliders to interact with particles)
- Screen Space Rendering for Fluids (experimental)
- Complex Mesh and Terrain Collision on GPU side
- Attract and Repel Force Areas
- All kind of Blend mode for rendering
MARCHING CUBE APPROACH
Compute shader metaball approach to render a real-time fluid:
The result is not bad, still heavy with a high definition lattice but it can be managed in a small area with at a good framerate (120-150 here).
Isosurface and Marching Cube algorithms are not an easy subject but I found interesting articles and I ported some C++ sources (DirectX10) from Nvidia to Unity (DirectX11).
Here are some links: