Skip to content

interactive fluid simulation in browser based on SPH, GPU-accelerated with WebGL2

License

Notifications You must be signed in to change notification settings

loganzartman/wavescape

Repository files navigation

wavescape

WIP interactive, GPU-accelerated fluid simulation using smoothed particle hydrodynamics.

It can do all the simulation work on the GPU using WebGL2! It doesn't use WebGL2 Compute, which isn't widely supported. Instead, it does tricks with regular vertex and fragment shaders.

try it!

a dam break scene where water sloshes from one side to the other

controls

  • space: start/stop simulation
  • s: step forward in time (use while stopped)
  • r: reset
  • click and drag: touch fluid
  • click settings for some tweakable parameters!

references