Live data from Hacker News

WebGL Fluid Simulation

paveldogreat.github.io

51–60 of 106 posts

Re: WebGL Fluid Simulation

#51
Here is the "main loop" for the simulation: https://github.com/PavelDoGreat/WebGL-Fluid-Simulation/blob/...

I don't know enough about fluid dynamics to be the judge, but it seems like the engine is using genuine (2D) physics and it's not just "toy physics." Could someone who knows fluid mechanics comment on this?

Re: WebGL Fluid Simulation

#56
Default settings don't really do it justice IMHO. Try these:

Density diffusion: just a hair under 1(visually)

velocity diffusion: 0.99

pressure: 0.93

vorticity: 5

Re: WebGL Fluid Simulation

#59

Reminds me of those cool visualisations that Winamp had, think they were called Milkdrop?

I’ve once tried to port AVS to GPU: https://github.com/Const-me/vis_avs_dx Already runs ~half of built-in presets.

If I’ll have time for that, maybe I should add custom D3D-specific effects there that weren’t there in the original version. Fluid simulation is one of them. BTW it’s easier to implement with compute shaders. WebGL only support them on Chrome/Chromium and only on desktops, that’s why OP used some trickery with fragment shaders instead.

Re: WebGL Fluid Simulation

#60

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.

That is actually amazing. I mean the fact about 2004.
Post reply on HN