A real-time fluid simulation implementing Jos Stam's "Stable Fluids" 1 solver, and computed on the GPU based on the techniques described by Mark J Harris in GPU Gems 2.
See demos for video files
Implementation stores velocity fields and substance density fields for each timestep, and operates on them using fragment shaders, rendering the result of each operation to a framebuffer bound to a texture.
Footnotes
-
Stam, Jos. "Stable fluids." Proceedings of the 26th annual conference on Computer graphics and interactive techniques. 1999. https://pages.cs.wisc.edu/~chaol/data/cs777/stam-stable_fluids.pdf ↩
-
Harris, Mark J. "Fast fluid dynamics simulation on the GPU." SIGGRAPH Courses 220.10.1145 (2005): 1198555-1198790. https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu ↩