Grid-Based Fluid Simulation
Implementing a stable fluids solver using multiple compute shader passes over 2D and 3D textures.
We use the Navier-Stokes equations, performing advection, diffusion, and projection via Jacobi iteration on the GPU.
// Projection pass
@compute @workgroup_size(16, 16)
fn jacobi_iteration(...) {
// 40 iterations of Jacobi solver
}