
WebGL Water (2011) - joubert
http://madebyevan.com/webgl-water/
======
SXX
Anyone who want to check one of the best WebGL demos should try this:

[http://codeflow.org/webgl/craftscape/](http://codeflow.org/webgl/craftscape/)

~~~
FraKtus
Nice!

------
mkilling
Are there any more modern real-time water effects out there/being researched?
This basic effect has been around for a while now.

~~~
SXX
As far as I aware best available for real-time is NVIDIA FleX:

[https://www.youtube.com/watch?v=pfonMfP__Ks](https://www.youtube.com/watch?v=pfonMfP__Ks)

In open source field there is Mantaflow that available in Blender, but it's of
course not solution for real-time.

------
polpo
Cool tech demos like this one can have unforeseen uses: On an episode of the
podcast Reply All [1], a "trip sitter" would use this site to help calm people
down who were on bad trips, and it was pretty effective.

[1] [https://gimletmedia.com/episode/44-shine-on-you-crazy-
goldma...](https://gimletmedia.com/episode/44-shine-on-you-crazy-goldman/)

------
tehsauce
His webgl pathtracer is very cool also! [http://madebyevan.com/webgl-path-
tracing/](http://madebyevan.com/webgl-path-tracing/)

~~~
worldsayshi
Wow that's really close to "perfect" real time performance.

------
cryodesign
First time I saw this it was awesome - still is - real-time water effects in
the browser.

Didn't know Evan is co-founder of figma.com - maybe that's why the app feels
quite snappy in the browser.

~~~
dfield
Yep, Evan is my cofounder! We started talking about building collaborative
creative tools using WebGL shortly after he built this demo in an afternoon
during summer 2011.

Shameless plug: if anyone is interested in working with us on Figma, we're
hiring.
[https://www.figma.com/careers#jobs](https://www.figma.com/careers#jobs)

------
asadlionpk
This was amazing when I first saw it. More so because I was working on an SPH
implementation:

[http://jsexperiments.herokuapp.com/sph/](http://jsexperiments.herokuapp.com/sph/)

source: [https://github.com/asadm/SPHjs](https://github.com/asadm/SPHjs)

------
hyperpallium
Why aren't there floating-point textures on mobile GPUs? (To me) it seems a
pretty straightforward addition, and many more GPGPU tasks become easier.

Sure, you can en/decode yourself, but faster in silicon.

Sure, there's openCL, but it's more fiddly, gives worse performance, and no-
one uses it.

~~~
mechanical_berk
ES3 requires floating-point texture support, so any mobile GPU which supports
that will support floating-point textures. The extension may not be exposed in
ES2 of course.

Note that:

\- 32-bit float texture filtering is not required to be supported, as it may
cost significant area.

\- Floating-point framebuffer support is not required, due to patent issues...
:S

~~~
DiThi
Do you have more info on the patent issue?

~~~
mechanical_berk
See
[https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_c...](https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt)
and
[http://www.google.co.uk/patents/US6650327](http://www.google.co.uk/patents/US6650327)

~~~
hyperpallium
Not to turn this into a debate on patents, but even the patent itself seems to
admit it's an obvious and anticipated improvement made possible by cheaper
silicon:

> In an effort to gain the advantages conferred by operating on a floating
> point basis, some prior art systems have attempted to perform floating point
> through software emulation

> But as advances in semiconductor and computer technology enable greater
> processing power and faster speeds; as prices drop;...it has been
> __discovered__ by the present inventors that it is now practical to
> implement some portions or even the entire rasterization process by hardware
> in a floating point format. [emphasis added]

> Hence, due to the improvements in processor speed and other improvements
> that make it practical to operate on large amounts of data, it is now
> possible and cost beneficial to utilize the valuable information that can be
> provided by the frame buffer.

It's a good idea, but obvious - everyone was waiting for this inevitable
improvement. Their idea of floating-point-all-the-things is also good, but
just a matter of engineering. They don't disclose their exact engineering,
anyway; but just patent the general idea.

> Thus, there is a need for a graphical display system which predominately
> uses floating point throughout the entire geometry, rasterization, and frame
> buffering processes. The present invention provides one such display system.

I'm surprised it was granted, and I don't think it would upheld in court - but
it doesn't need to, it's just another plank in the patent portfolio.

------
rasz
Judging by how it runs on the desktop(4 year old gpu) and YT clip it was
developed on anemic laptop and never speed tested, reminds me of Wing
Commander or Test Drive 3. Learn from the past and dont link main loop speed
to framefate.

~~~
jlg23
I think for a demo that is perfectly fine since you get an immediate
performance indicator.

I remember that the initial fbdev-on-linux folks showcased their drivers with
well known animations[1] at 4-digit frame rates and never had to answer
performance questions again.

[1] IIRC something like glxgears and some 3d-tubes screensaver - might have
that wrong though, that was about 17 years ago.

~~~
lloeki
Indeed, and with surprising results. I remember running this on a laptop
(HD4000 or something) some years ago on which it ran like crap, and it took a
dedicated Radeon card (6870 IIRC) to have it smooth. Today it runs what
appears to be a solid vsync'd 60fps on my iPhone 6s.

------
acomjean
hint: you can click on the water

------
fulafel
This is from 2011 or so.

~~~
diimdeep
Mind blown when first saw this somewhere in 2011

------
tomxor
SPH is better and i've seen some webgl ones out there.

------
ge96
Just wanted to point out not working on Chromebook

Uncaught Error: This demo requires the OES_texture_float extension

I've seen this before though on Reddit, pretty cool how well it works on
Mobile.

Also I realize OP may not be related to the post/created it and I should file
a bug or whatever, I'm just posting it here.

