Skip to content

AminAliari/fluid-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-time SPH Fluid Simulation on GPU - Web Page

How to build

Install the Vulkan SDK and build the project with your preferred Visual Studio version. Example:

/Application/Solution - Visual Studio 2022/Project.snl

Project structure

Root
│   README.md
│
└─── Application
│   | Source
|   └─── FluidSim.cpp: Main cpp application.
|   |
|   └─── Shaders: Contains all the vertex, fragment, and compute shaders.
|        └─── ShaderList.fsl: list of all shaders. Used by The Forge.
|        └─── resources.h.fsl: header file that defines all the shader resources (cbuffers, SRVs, UAVs, etc.).
|        └─── helper.h.fsl: header file with various helper functions.
|        └─── basic.vert.fsl: basic vertex shader for drawing one plane.
|        └─── instanced.vert.fsl: vertex shader for instance drawing of multiple planes.
|        └─── sphereInstanced.vert.fsl: vertex shader for instance drawing of all particles. 
|        └─── basic.frag.fsl: basic pixel shader for all objects in the scene.
|        └─── partition.comp.fsl: compute shader to partition all particles.
|        └─── sort.comp.fsl: compute shader for AMD sort.
|        └─── sortStep.comp.fsl: compute shader for AMD step sort.
|        └─── sortInner.comp.fsl: compute shader for AMD inner sort.
|        └─── resetOffset.comp.fsl: compute shader to reset offset buffer.
|        └─── partitionOffset.comp.fsl: compute shader to assign offset buffer.
|        └─── density.comp.fsl: compute shader to calculate density.
|        └─── force.comp.fsl: compute shader to calculate force.
|        └─── simluate.comp.fsl: compute shader to handle collisions and integrate force, velocity, pos, etc.
|   |
|   | Solution - Visual Studio 2017: Solution to build the app.
|   | Solution - Visual Studio 2019: Solution to build the app.
|   | Solution - Visual Studio 2022: Solution to build the app.
│   | Resources: The Forge minimum resources for running the app.
│
└─── The Forge: Middleware for rendering.
|
└─── Tools: The Forge tools.

References

License

The project's license is MIT. The Forge middleware uses Apache 2.0, but the third parties used by it have their own respective licenses. Also, AMD's SortLib license is MIT.