5 ms·
Unfortunately, WebGL hasn't been updated in a while and it is badly outdated. There's a bit of a mismatch between providing low level access to the GPU and allo
by exDM69 12y ago
Unfortunately, WebGL hasn't been updated in a while and it is badly outdated. There's a bit of a mismatch between providing low level access to the GPU and allowing to run untrusted content from the Web. This has performance implications, particularly with this example that generates geometry dynamically.
There's a decade's worth of new graphics features that aren't available via WebGL, even though the hardware supports it (even mobile phones these days).
I am getting less than 25 frames per second and I have a high end GPU. This should easily run at 60 fps and have plenty of idle time (for CPU and GPU). Now it's consuming a lot of CPU and fans are spinning up.
I really hope that WebGL gets a long awaited update, and that there will be better sandboxing techniques employed. The issues with security can't be solved at the browser level alone and there's quite a big performance hit when done at that level.
There is hardware/driver level support for some of the security issues (via OpenGL robustness extensions), but even when they are available, there's still a redundant layer of userspace security applied.
This leads to some ridiculous implications when developing WebGL content, e.g. indexed rendering (glDrawElements) can't really be used (esp. with dynamic content) because the index buffer has to be inspected (with the CPU) for out-of-bounds indices. There is hardware support for bounds checking in many new GPUs (desktop and mobile) and it's easy to detect, but none of the popular implementations rely on that even when available.
WebGL might be impressive in the browser but unfortunately it's roughly equivalent to what was available on the desktop in 2004 and on the mobile in 2010.
- flohofwoe 12y agoStrange, the demo runs perfectly at 60fps on my 2012 MacBookPro with Intel HD4000 in Chrome, is your browser and graphics driver uptodate? The new performance implications introduced by WebGL (like that dynamices indices are bad) are quite similar to restrictions of other platforms (for instance on tiled platform like PowerVR, any sort of transparency is much more expensive then on other platforms because it kills the per-tile hidden-surface-removal, etc). Basically, each GL platform has other performance characteristics that applications need to be aware of, write-once-run-(perfectly)-everywhere was never true for any 3D API, and WebGL is not different. I think that WebGL+extensions provide a pretty good basic feature set for 3D apps and games, of course it could be better, but given the fact that WebGL needs to serve the widest range of target platforms of ANY 3D API, and it's miles better then no GPU access in the browser at all. BTW, WebGL2 can already be tested in Firefox, this brings WebGL to the OpenGLES3 feature set: https://wiki.mozilla.org/Platform/GFX/WebGL2 https://wiki.mozilla.org/Platform/GFX/WebGL2
- exDM69 12y agoYes, I'm up-to-date but in my experience Firefox has a worse WebGL implementation than Chrome. Didn't try with Chrome. I also have a not-so-great CPU (but a high end GPU) so that affects too. In any case, my computer is able to run quite high end games, it should easily be able to run a simple terrain demo if it weren't for the overhead. There's certainly different performance characteristics in different OpenGL implementations (ie. GPUs) but WebGL overhead comes on top of that. So in addition to the performance characteristics of the GPU itself, you have to think about the browser's software implementation too. WebGL is definitely a welcome addition to the facilities available in the browser, but getting more up-to-date features would be nice. And using the security features (especially bounds checking) of the hardware if available to avoid unnecessary overhead would make it a lot more appealing.
- Excavator 12y agoHave you checked to make sure that hardware acceleration is enabled? http://blog.mozilla.org/joe/2010/11/10/how-to-tell-if-youre-using-hardware-acceleration/ http://blog.mozilla.org/joe/2010/11/10/how-to-tell-if-youre-...
- bhouston 12y agoWebGL 2.0 which is OpenGL ES 3.0 is soon. :) https://www.khronos.org/registry/webgl/specs/latest/2.0/ https://www.khronos.org/registry/webgl/specs/latest/2.0/
- fulafel 12y ago> Unfortunately, WebGL hasn't been updated in a while and it is badly outdated WebGL implementations have a lot of trouble coping with WebGL 1.0 still. It's slowly approaching "ok to use" status. A large portion of web users have no WebGL, or a sw-only version of it (SwiftShader in Chrome). This with a 4 year old spec. With more frequent spec updates WebGL would have lost all credibility due to mismatch between spec and reality, and variation in implementation quality.
- pjmlp 12y agoDoes it still have any? As an old timer graphics geek, I am seeing it following the VRML footsteps. Cool for demos and small scale prototypes, but that is about it.
- fulafel 12y agoWell, big time credibility is something that only a mature tech has, but I'd say surprisingly good. Serious users from many niches as early adopters, and results are of technically high quality (Clara.io, Tinkercad, various medical imaging and architecture stuff), and of course there's the games scene that has the potential to go big. And browser support is on good track with Microsoft and Apple on board now, and a lot of attention on support in mobile browsers.
- deleted 12y ago[deleted]
- pjmlp 12y agoRegarding mobile browsers, the demo just dies on my OpenGL ES 3.0 capable mobiles.