GithubHelp home page GithubHelp logo

aminaliari / fluid-simulation Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 54.79 MB

Real-time SPH Fluid Simulation on GPU

Home Page: https://aminaliari.github.io/posts/fluid-sim

License: MIT License

C++ 67.56% C 15.93% Objective-C 0.76% Objective-C++ 11.12% Java 0.07% Python 4.44% Batchfile 0.08% PowerShell 0.04%
directx12 fluid-simulation nbody-simulation sph-fluid vulkan gpu-acceleration compute-shader

fluid-simulation's Introduction

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.

fluid-simulation's People

Contributors

aminaliari avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

fluid-simulation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.