News for hackers. Stuff that matters.
Re:WebGL: 80.000 particles by Udo on Tuesday April 07, 2015 @08:40AM (#9333504)
I was expecting the particles to be done as a pure shader implementation, but when I looked at the source that's not the case. While a vertex shader is used to display the particles, the "physics" is done in a JavaScript loop.
Re:WebGL: 80.000 particles by pierrec on Tuesday April 07, 2015 @09:01AM (#9333633)
This also surprised me. You can do the exact same thing, but with millions of particles, if you store and process them on the GPU. The first example of that technique being used in WebGL is probably by Mr.doob [1]. Since then, there have been many iterations, some of which are basically a cooler version of the linked demo [2]. (And simpler, judging from the source!)

[1]: https://www.chromeexperiments.com/experiment/magic-dust

[2]: https://www.chromeexperiments.com/experiment/one-million-par...

Re:WebGL: 80.000 particles by boblemarin on Tuesday April 07, 2015 @08:49AM (#9333544)
Exactly, there's not much optimisation in there. In fact, it was my first try with WebGL.