Skip to content
/ fluid Public

A real time fluid simulation using OpenGL shaders

Notifications You must be signed in to change notification settings

mishurov/fluid

Repository files navigation

Inkling

A real time fluid simulation based on the Navier-Stokes equations and computed in OpenGL fragment shaders.

Android version

WebGL version

In a nutshell, the governing Navier-Stokes equations for incompressible fluid (i.e. momentum and mass conservation equations) are discretised via finite differences, advection is solved by a semi-Lagrangian method (unconditionally stable) and a Jacobi relaxation metod is being used for the Poisson-pressure equation, the resulting pressure gradient is substracted in order to get a divergence-free velocity field for a next timestep. The maths and some code of the fragment shaders are described in Nvidia's GPU Gems

The framework for the fluid simulation is based on this project.

Floating point scalar and vector fields are packed (lossy) into unsigned byte textures in order to get rid of GL_OES_texture_float depenency, the extention is not supported by some GPUs in Android devices.

About

A real time fluid simulation using OpenGL shaders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published