A fluid simulation system based on Position Based Fluids and screen space rendering technique built from scratch with OpenGL.
GLM
: already included in this repositorystb_image
: already included in this repositoryGLFW
: needed to be installed; e.g., from the official website. The CMakeLists.txt should be able to find the library after installation- Windows/Linux: macOS doesn't support the latest OpenGL including compute shader
The project's build system is cmake. To build the project, run the following shell command:
cmake -S . -B build
cd build
cmake --build .
After executing the commands, you be able to find executable main
You can use the same commands as above if you've activated Visual Studio environment in your terminal.
Alternatively, simply open the repository in Visual Studio and build it as usual.
Run the executable main
or main.exe
built as above.
- Arrow keys: control the boundary of the fluid
R
key: reset the fluid- mouse drag: control the camera
- Position Based Fluids
- Screen Space Fluid Rendering for Games
- Compute Shaders in Graphics: Gaussian Blur
- OpenGL Superbible: Comprehensive Tutorial and Reference