navier-stokes-webgl
29 |Stable fluid simulation on GPU using WebGL.
30 |Live version here.
31 |This is an implementation of the Stable Fluid described by Jos Stam.
32 | 33 |Simulation
34 |The simulation is implemented on GPU with the method provided in GPU Gems. 35 | The diffusion term was dropped since it didn't have much visual influence.
36 |Data storage
37 |This simulation can run in two modes for storing the velocities:
38 |-
39 |
- velocity stored in float textures: each component (x, y) is stored as a 32bit float.
40 | To do so the following extensions must be available:
OES_texture_float,WEBGL_color_buffer_float,OES_texture_float_linear.
41 | - velocity stored in normal textures with four 8bit channels. 42 | In this mode each component is stored as a 16bit fixed point value, encoded in two 8bit texture channels. 43 | This mode provides less precision for the computing, and you can see artifacts if you push the display color intensity to the maximum. 44 |