3 ms·
Not what you mean, but here's the same demo without instancing and lots of drawcalls, but careful, it will grind your browser to a halt pretty quickly: http://
by flohofwoe 12y ago
Not what you mean, but here's the same demo without instancing and lots of drawcalls, but careful, it will grind your browser to a halt pretty quickly:
http://floooh.github.io/oryol/DrawCallPerf.html http://floooh.github.io/oryol/DrawCallPerf.html
This is one uniform update and one draw call per particle in a loop.
Unfortunately draw call overhead on WebGL is really bad compared to desktop GL. On my Windows7/nvidia setup I can go up to about 75k draw calls before frame rate drops below 60fps, on other platforms it's worse. So in this particular (very simple) scenario, hardware instancing actually pays off.
For quad particle systems it is indeed usually better to just directly write the vertices to a dynamic buffer instead of instancing, but I don't have a demo (yet) for this particular case :)
- hackcasual 12y agoYeah, definitely keep draw calls low. I'm not surprised to see instancing beating that. I'd be curious to see your comparison over non instanced/single draw call though. I threw the adapter code I wrote for my instanced version up here if it helps: http://pastebin.com/1gjvreBs http://pastebin.com/1gjvreBs