Skip to content

YuiyuD001/GPU-GEMS-2D-Fluid-Simulation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

2D-Fluid-Simulation

This a port of the GPU GEMS article on fluid simulation to Unity. Well kinda. Its is mostly based on a 2D fluid sim found on the Little Grasshopper blog. That project was based on the GPU GEMS article also. I found he had simplified the code a little and his way of doing things was much easier to read.

There are a lot of stages to perform per frame and getting these to all work in the right order was a little bit of a pain. I was quite surprised by how many graphics blit operations need to be performed each frame. There needs to be about 60 per frame. This is a huge amount of work for the GPU to do but the frame rate is still about 60 fps which is not bad. You can decrease the number of jacobi iterations which take up the majority of the work that needs to be done. The quality of the fluid simulation will suffer if it is decreased too much as they are needed to compute a divergent free fluid simulation.

See home page for more information and unity package download.

2D Fluid Sim

About

2D fluid simulation in Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 52.1%
  • ShaderLab 47.9%