Live data from Hacker News

WebGL Fluid Simulation

paveldogreat.github.io

41–50 of 106 posts

Re: WebGL Fluid Simulation

#45

Every so often you get an app that shows you just how fast modern hardware is when unencumbered by the usual endless layers of bloat and inefficiency.

To be fair this shader was published in GPU Gems 15 years ago (2004). Back in the days of the GeForce 6 and Windows XP. Though the fact that it now fits in your pocket is cool.

Re: WebGL Fluid Simulation

#46
Impressive demo! WebGL is an awesome piece of tech that only now starts to be largely adopted. I mean, it gives you access to 100s of cores to compute, run, display stuff :).

Too bad Apple doesn't move forward with WebGL2 and Google splits the community in 2 with webgpu.

Re: WebGL Fluid Simulation

#47

Wow so cool. Any summary on how the algorithm works roughly?

The repo refers to this article: http://developer.download.nvidia.com/books/HTML/gpugems/gpug... Looks like it's standard Navier-Stokes.

If it's based on that, it's essentially an implementation of Jos Stam's "stable fluids" which actually uses some tricks to get plausible results. http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/...

Re: WebGL Fluid Simulation

#48

Wow so cool. Any summary on how the algorithm works roughly?

The repo refers to this article: http://developer.download.nvidia.com/books/HTML/gpugems/gpug... Looks like it's standard Navier-Stokes.

Not quite standard. The trick is to use backward differencing in time, to make it unconditionally stable even for longer time steps. Also the Poisson equation to get the pressure is only solved approximately by doing Jacobi iterations until the solution is "good enough". And of course it is limited to 2d and the incompressible limit.

Re: WebGL Fluid Simulation

#49
post #36
post #2

I tried this on my mobile phone, expecting it to not work properly, but everything was super-smooth. Impressive.

I know right. So then I tried multi touch on my iPhone. Five fingers smooth as can be..

:O THE MULTITOUCH! Man am I ever a sucker for a good multi touch demo.

Re: WebGL Fluid Simulation

#50

Impressive demo! WebGL is an awesome piece of tech that only now starts to be largely adopted. I mean, it gives you access to 100s of cores to compute, run, display stuff :). Too bad Apple doesn't move forward with WebGL2 and Google splits the community in 2 with webgpu.

Apple has never embraced gaming in any serious way
Post reply on HN