Fire Simulation with Vulkan Compute Shaders
Fluid dynamic simulation in C++ and Vulkan, with a Qt graphical user interface.

Features
- Vulkan compute shaders written in Slang that implement a fluid dynamics solver and model the Navier-Stokes equations
- with additional vorticity confinement
- Qt graphical user interface for customizing shader parameters with instant feedback

Compute Stages
Fire is modeled as a density field and a velocity field, with the density field representing fuel temperature and the velocity field representing movement velocity due to buoyancy or wind. Each update is broken down into these steps:
- Add source
- Diffuse
- Compute curl
- Add vorticity confinement
- Project velocity
- Advect velocity
- Project velocity
- Advect density
Velocity projection enforces the velocity field to be mass-conserving, leading to more realistic dynamics. It is further broken down into these steps:
- Compute divergence
- Compute pressure field
- Adjust velocity based on pressure field