# paveldogreat/webgl-fluid-simulation

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/paveldogreat-webgl-fluid-simulation).**

16,429 stars · 1,891 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/PavelDoGreat/WebGL-Fluid-Simulation
- Homepage: https://paveldogreat.github.io/WebGL-Fluid-Simulation/
- awesome-repositories: https://awesome-repositories.com/repository/paveldogreat-webgl-fluid-simulation.md

## Topics

`fluid` `gpu` `navier-stokes` `simulation` `webgl`

## Description

This project is a GPU-accelerated fluid renderer and interactive WebGL visualizer. It functions as a fluid dynamics sandbox for experimenting with the real-time movement and behavior of liquids.

The simulation calculates density, pressure, and vorticity using GPU shaders to maintain high performance. It includes atmospheric visual effects such as bloom and sunrays, alongside tools for capturing the simulation state as static images.

The underlying architecture utilizes fragment-shader rendering and ping-pong texture buffering to manage fluid physics. Multi-pass post-processing is used to apply visual styling, while global uniforms allow for the real-time adjustment of simulation parameters.

## Tags

### Scientific & Mathematical Computing

- [Fluid Dynamics Simulation](https://awesome-repositories.com/f/scientific-mathematical-computing/applied-domain-sciences/fluid-dynamics-analysis/fluid-dynamics-simulation.md) — Provides an interactive simulation of liquid movement and behavior using density, pressure, and vorticity parameters. ([source](https://cdn.jsdelivr.net/gh/paveldogreat/webgl-fluid-simulation@master/README.md))
- [Fluid Dynamics Sandboxes](https://awesome-repositories.com/f/scientific-mathematical-computing/applied-domain-sciences/fluid-dynamics-analysis/fluid-dynamics-sandboxes.md) — Functions as a real-time experiment environment for manipulating liquid movement and capturing simulation frames.

### Graphics & Multimedia

- [GPU Accelerated Rendering](https://awesome-repositories.com/f/graphics-multimedia/gpu-accelerated-rendering.md) — Uses graphics hardware to accelerate the computation of fluid density, pressure, and vorticity in real time.
- [Interactive WebGL Visualizers](https://awesome-repositories.com/f/graphics-multimedia/interactive-webgl-visualizers.md) — Provides a browser-based interactive tool for exploring fluid behavior with customizable atmospheric effects.
- [Atmospheric Effect Configuration](https://awesome-repositories.com/f/graphics-multimedia/custom-animation-effects/visual-configuration-options/atmospheric-effect-configuration.md) — Offers customizable atmospheric styling including bloom and sunrays to adjust the simulation's overall look. ([source](https://paveldogreat.github.io/WebGL-Fluid-Simulation/))
- [Fragment Shader Rendering](https://awesome-repositories.com/f/graphics-multimedia/fragment-shader-rendering.md) — Implements physics and visual styling entirely within GLSL shaders to minimize CPU overhead.
- [Multi-Pass Rendering Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/post-processing-pipelines/multi-pass-rendering-pipelines.md) — Utilizes a chain of multiple rendering operations to apply complex post-processing effects like bloom and sunrays.
- [Ping-Pong Buffering](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/texture-mapping-pipelines/render-to-texture-buffers/ping-pong-buffering.md) — Employs a dual-texture swap mechanism to manage fluid physics calculations across frames.
