In fact I think this is one of the most frustrating things of working with WebGL (or any of those slightly less common browser APIs, really), lots of small weird compatibility issues and instabilities.
788 karma · joined August 2, 2012
In fact I think this is one of the most frustrating things of working with WebGL (or any of those slightly less common browser APIs, really), lots of small weird compatibility issues and instabilities.
You can see the original effect here[1], along with an explanation here[2].
If you like it, you can see a few more effects and experiments on my portfolio here[3], although it's been a couple of years now since I've done anything of the sort (that I can post publicly, that is).
[1] https://tympanus.net/Development/RainEffect/
[2] https://tympanus.net/codrops/2015/11/04/rain-water-effect-ex...
The one you posted is in many ways nicer though due to it all being a single shader, however it has the downside of the drops not interacting with each other.
[1] https://tympanus.net/Development/RainEffect/
[2] https://tympanus.net/codrops/2015/11/04/rain-water-effect-ex...
It should be solvable though, I just couldn't get the values right at the time.
(Also thanks!)
The page actually uses the exact same effect, so the article provides a decent breakdown of how it works, for those interested.
(And on to the point, Facebook has also, of course, WhatsApp, which is massive)
But it doesn't matter, I posted the code for it to be used, I'm glad to see it in the wild.
You've probably come across it though, as it does seem to gloss over some basic stuff. But it does cover the basics pretty well, just gotta keep an eye for details and seemingly unimportant one-liners that turn out to be fundamental.
It also takes some googling for deeper explanation of some functions, which often result on Stack Overflow answers by the author himself.
Dealing with the WebGL API itself is a bit... let's say tricky, though. But working with shaders for me is a joy.
This also seems promising, though I only skimmed over it: https://thebookofshaders.com/
And also, look into https://shadertoy.com/. Both for using the shaders there as example and as a playground.
But there are some neat tricks which, while not necessarily transferable themselves, might serve as inspiration for other problems.
By that point I had already spent more time on this than I'd have liked, and allowing for a little blur was an easier way for it to look good enough.
I haven't been doing any "public" work lately, but I'll post anything I make on my Twitter[1], especially if I ever get to finish this updated version.
Try this version for comparison: https://codepen.io/stefanweck/pen/Vbgeax
I wrote an article about it here[1], but I made this back when I was first learning WebGL (it was my first WebGL project, in fact), so be aware that a lot of things could be better!
[1]https://tympanus.net/codrops/2015/11/04/rain-water-effect-ex...
Somebody has made a version using WebGL alone[1] (sadly they got the refraction a bit wrong), try it to see if it works well enough (and let me know, I'm curious myself).
I mean, the rain effect itself, not the whole UI around it here.
Edit: Here's[1] the accompanying article, and here's[2] some other stuff I made (although my website is also just as old and hasn't been updated since!)
[1]http://tympanus.net/codrops/rain-water-effect-experiments/
I agree it's harder for students though.