GPU Particles - A GPU-based particle simulation in Unity
Engine: Unity
Other Tech: compute shaders, geometry shaders
An implementation of particle systems in Unity on the GPU. This does not use Unity's built-in particle systems at all. Rather, it stores a list of all particles on the GPU, and uses a compute shader to update them one or more times per frame. The particles are rendered using a geometry shader to expand a point into a quad facing the camera, then a basic vertex/fragment shader.
There are several properties that can be controlled for each particle system:
- Emitter shape: box, sphere, cylinder, and arbitrary mesh
- Start color range and linear color animation
- Start size range and linear size animation
- Start velocity and linear speed animation
- Animate color based on speed
- Lifetime range
- Particle count
- Point gravity
- Local or world space simulation
- Sprite and sprite animation
This was my final project for the class Computer Animation, along with my teammate, Eric Cerini. I was responsible for most of the shader work in the compute and geometry shaders.