Ro delay fps
Advection on 512×512 square. Simulation is based on the "stable fluids" method of Stam [1,2]. The implicit advection step traces backward through the velocity field to determine how quantities are carried forward.
<script id="shader-fs" type="x-shader/x-fragment"> 
precision highp float;
  uniform sampler2D samp;
  varying vec2 tc;
  const float h = 1./512.;
void main(void) {
   vec2 t = texture2D(samp, tc).xy;
   vec2 D = -3.*t,   Df = floor(D),   Dd = D - Df;
   vec2 tc1 = tc + Df*h;
   float new =    // bilinear interpolation of the 4 closest texels
     (texture2D(samp, tc1).z*(1. - Dd.y) +
      texture2D(samp, vec2(tc1.x, tc1.y + h)).z*Dd.y)*(1. - Dd.x) +
     (texture2D(samp, vec2(tc1.x + h, tc1.y)).z*(1. - Dd.y) +
      texture2D(samp, vec2(tc1.x + h, tc1.y + h)).z*Dd.y)*Dd.x;
   gl_FragColor = vec4(t, new, 1. );
}
</script> 

[1] Jos Stam   Real-Time Fluid Dynamics for Games
[2] Mark J. Harris   Fast Fluid Dynamics Simulation on the GPU   GPU Gems: Chapter 38


Simulations on GPU
updated 9 July 2011