6 ms·
WebGPU for Metal Developers
- pjmlp 5y ago> WebGL, in its quest for programmer familiarity and cross-platform ubiquity, adopted the API of OpenGL ES. As such it has never been capable of exploiting the full power of the underlying GPU, even as desktop APIs like DirectX 12, Metal, and Vulkan debuted and became popular. Furthermore, Apple has been slow to build out full support for WebGL 2: as of this writing, it remains an Experimental Feature in Safari). After being released in 2017, which is why WebGL never been able to match Flash/Stage3D for online games and most indies just went native mobile games anyway. WebGL seems to be stuck into basic 3D visualizations for items on virtual shops, cool effects and some demos. It still is an easier way to play with shaders, provided one doesn't care about anything past GL ES 3.0. As for WebGPU, given its current state with so many features postponed for after 1.0, while native APIs are migrating to mesh shaders and ray tracing extensions, it remains to be seen how much adoption it will get in about 5 years time. Lets see what those GPUs will be capable of doing versus what WebGPU can do by then. Sorry for the rant, the article was well written, and despite all, I still advise anyone that cares about 3D graphics to have a go at WebGPU.
- fulafel 5y agoGoogle Maps and Flutter based web apps are some big users of WebGL. Also Unity based web apps/games. 3D visualizations are a thing too but not sure if they are that popular.
- ulzeraj 5y agoI can imagine the likes of Citrix and MS RDP benefiting from this. Having worked from home since last year I have the impression that the Workspace App is the most 2003 software I've seen in current year. You have all these free gaming apps doing video and audio streaming on real time through a browser while I'm using a super expensive system that requires me to install an extension and at least 3 background services in my machine. What the hell?
- otterlicious 5y agoThere is an HTML5 Citrix client and it's a more terrible experience in every way. I hear there is an official HTML5 RDP client now too that is probably the same. Even newer "cloud-native" entrants like Amazon WorkSpaces have their own thick clients, for a reason.
- ulzeraj 5y agoTo be honest I have no quarry against RDP. You download a sandboxed app from the store and just use it. Meanwhile Citrix offers an installer that puts 3 services on your computer and then you need to run another another installer to be able to use conferencing. Why does shadow.tech and even self hosted Rainway can offer a seamless gaming desktop experience on a simple client or browser while billion dollars Citrix lots of services running on background?
- archerx 5y agoWhy are flutter web apps so slow and sluggish?
- pjmlp 5y agoAny Android 5 device running up to OpenGL ES 3.x, with a game written in Java (not even bothering with NDK) can easily outperform WebGL on the same device. Yes Google makes some use of it, yet they also have them compiled into native apps for mobile devices. Your beautiful WebGL application running at 60 FPS on developer machine might not even run user's browser, if the OS, drivers or GPGPU model happen to fulfill some blacklisting criteria that you can't control at all. With native rendering you can at least workaround possible bugs and still offer a good experience.
- fulafel 5y agoSure. But you could say the same about a lot of recent web platform features. Native apps work best for some business cases, web apps work best for others.
- fulafel 5y agoAlso Google Meet apparently uses it for the virtual background effect: https://support.google.com/meet/answer/10058482 https://support.google.com/meet/answer/10058482
- Benjamin_Dobell 5y agoI'm very much looking forward to WebGPU becoming mainstream, as there's definitely more performance to be had. However, the use cases for WebGL aren't quite as bad as you're making out. I'm CTO of a business that's core offering (since 2016) is selling real-time interactive 3D real estate models. Browser support is decent, our models run in mobile browsers alright. The models certainly run slower on mobile than they do on a gaming computer. However, on-board Intel graphics frequently found in enterprise laptops can be worse performing than a decent mobile phone. Sadly my preferred browser, Firefox, has (by quite a significant margin) the worst performance of all mainstream browsers. It's more CPU bound than GPU bound though.
- pjmlp 5y agoWell that fits the use case I described, > WebGL seems to be stuck into basic 3D visualizations for items on virtual shops, cool effects and some demos.
- Benjamin_Dobell 5y agoAlright. I'll bite. Please elaborate, which one?
- pjmlp 5y agoSelling real-time interactive 3D real estate models seems like a "virtual shops" to me, no?
- Benjamin_Dobell 5y ago> items on virtual shops No. > "virtual shops" But also, no.
- pjmlp 5y agoWhat a great answer, thanks for the clarification. I can now fully appreciate how I made a mistake on my evaluation.
- seoaeu 5y agoRay tracing and mesh shaders aren't supported by mobile, macOS, or by roughly 90% of desktop systems. I don't think it is a deal breaker that WebGPU isn't planning to include them in their 1.0 release. That said, I do agree that how the group does at evolving the API over the 5+ year range will determine its long term success.
- pjmlp 5y agoThe best that WebGL 2.0 can do in 2021 is a subset of OpenGL ES 3.0, no matter what card the consumer has. Metal does support raytracing and mesh shaders like programming.
- deleted 5y ago[deleted]
- ttt0 5y agoI just hope that WebGL, WASM etc are not going to be abused like JavaScript now is and will be only used for professional applications when you actually need it or useless, nonessential things like video games.
- johndough 5y ago> I just hope that WebGL, WASM etc are not going to be abused Unfortunately, it is too late for that. For example, 50 % of sites using WASM are using it for crypto mining: https://www.dimva2019.org/wp-content/uploads/sites/31/2019/06/DIMVA19-slides-2-R.pdf https://www.dimva2019.org/wp-content/uploads/sites/31/2019/0... In addition, WebGL is being used for browser fingerprinting. Also, the implementations of both WASM and WebGL are quite complex and thereby greatly increase the attack surface of browsers. Just a few examples for vulnerabilities: https://www.cvedetails.com/vulnerability-list/vendor_id-20412/Webassembly.html https://www.cvedetails.com/vulnerability-list/vendor_id-2041... https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=webgl https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=webgl). https://www.cvedetails.com/cve/CVE-2014-1502/ https://www.cvedetails.com/cve/CVE-2014-1502/
- ttt0 5y agoI'm not talking about this kind of abuse, that's to be expected. What I mean is web developers using it when it's not absolutely necessary. On forums, blogs, news sites, search engines and stuff of that nature. I already have WebGL and WASM disabled, because I simply don't see why should I have it enabled. Don't require me to enable it for no reason is all I'm saying. Probably no one cares, but if you do require it, I'm going to just ignore your website.