Chrome will support the WebGPU API by default—here’s why that’s important

graphic detail —

Next-gen web graphics API aims to address the shortcomings of WebGL.


Chrome will support the WebGPU API by default—here’s why that’s important

Andrew Cunningham/Google

Google announced today that it would enable WebGPU support in its Chrome browser by default starting in version 113, currently in beta. In development since 2017, WebGPU is a next-generation graphics API that aims to bring the benefits of low-overhead APIs like Microsoft’s Direct3D 12, Apple’s Metal, and Vulkan to web browsers and other apps.

WebGPU support has been available but off by default in Chrome for a while now, because the API wasn’t finalized and things could break from update to update. Google says that Mozilla and Apple will eventually support WebGPU in Firefox and Safari, and browsers like Microsoft Edge and Opera that rely on the Chromium browser engine can presumably choose to switch it on just as Google has.

Chrome 113 supports WebGPU on Windows, macOS, and ChromeOS to start, with “support for other platforms” like Linux and Android “coming later this year.” This browser version should roll out to all Chrome users sometime in May.

Support in Chrome is a big boost for any new standard, whether it’s a new or updated API, image format, or video codec. Chrome accounts for roughly two-thirds of browser market share worldwide, according to StatCounter data, and nearly 80 percent of all browser market share if you count other Chromium-based browsers. Once Safari and Firefox add support, virtually all web browsers everywhere will be able to run WebGPU code, so it’s worth explaining in brief what WebGPU is and why it exists.

What is WebGPU?

WebGPU is a successor of sorts to WebGL, a much older API that allows OpenGL-based graphics to be rendered in your browser without requiring additional third-party plugins like Adobe’s Flash. Though revolutionary when it was announced in 2009, WebGL today suffers from many of the same problems OpenGL does: It doesn’t take advantage of all the features of current GPUs, it can lose performance because of driver overhead, and it has only limited and kludgey support for GPU compute workloads.

“Whereas WebGL is mostly for drawing images but can be repurposed (with great effort) to do other kinds of computations, WebGPU has first-class support for performing general computations on the GPU,” says the draft document explaining why WebGPU exists. The new API will enable improved graphics in frameworks like Babylon.js and game engines like Unity; will support GPU-accelerated workloads like the ones used for machine learning and AI; and can make it easier for web-based photo and video apps (among others) to use the kind of GPU acceleration that native apps benefit from.

WebGPU is being developed by a working group that includes members from Google, Microsoft, Apple, Mozilla, Intel, and many other companies, and as a result, the API has been designed to be as widely compatible as possible. WebGPU isn’t a direct implementation of any existing graphics API, but rather is its own API that sits on top of and interfaces with Direct3D 12, Metal, and Vulkan. This explainer from Surma, an engineer at Shopify and former Googler, sums it up well (emphasis ours):

“While WebGL is just a thin wrapper around OpenGL, WebGPU chose a different approach. It introduces its own abstractions and doesn’t directly mirror any of these native APIs. This is partially because no single API is available on all systems, but also because many concepts (such as extremely low-level memory management) aren’t idiomatic for a web-facing API. Instead, WebGPU was designed to both feel “webby” and to comfortably sit on top of any of the native graphics APIs while abstracting their idiosyncrasies. It’s being standardized in the W3C with all major browser vendors having a seat at the table.”

This has the benefit of making WebGPU code very portable—write WebGPU code, and as long as users have hardware and a browser that supports it, you should get the same result on a Windows system running Direct3D and an Android phone running Vulkan. And it avoids some of the hacks that keep WebGL running—for instance, WebGL on Windows and macOS doesn’t even use OpenGL directly, but rather a translator called ANGLE that turns OpenGL API calls into Direct3D and Metal API calls instead. With WebGPU, there’s no need to start a separate project to write around a slow or poorly maintained OpenGL implementation.

WebGPU also has its own shader language (WGSL), which the Chrome team is still working to support—today’s announcement says that Google “plans to provide deeper access to shader cores” via WGSL in a future release. Like the rest of the WebGPU API, WGSL is intended to be platform-agnostic and easily translatable to the preferred shader language of whatever operating system you’re running it on.

Finally, despite the “web” in its name, the WebGPU API isn’t restricted to browsers. The wgpu project is a version of WebGPU for Rust that allows WebGPU apps to be written and run outside of web browsers.

If you want to experiment with WebGPU now, the beta version of Chrome 113 is available here. A GitHub repo of code samples is available here, and there’s also official documentation about both WebGPU and WGSL.

Read More
Andrew Cunningham

Latest

8 UNESCO-listed rock-cut religious sites you should visit at least once

8 UNESCO-listed rock-cut religious sites you should visit at least once For centuries, communities have carved places of worship, monasteries, shrines and monumental sculptures into cliffs and hillsides. Today, these rock-... 1/8 Ajanta Caves, Maharashtra, India | A UNESCO World Heritage Site since 1983, the Ajanta Caves comprise 30 rock-cut Buddhist monuments dating from the

Top Cryptos Other Than Bitcoin and Ethereum Poised to Benefit From the CLARITY Act

The upcoming CLARITY Act is widely expected to reshape the U.S. crypto market by providing regulatory clarity for digital assets. While Bitcoin (BTC) and Ethereum (ETH) are likely to remain the primary institutional beneficiaries, several altcoins could also gain from increased institutional participation. From cryptos with active ETF ambitions to blockchain ecosystems powering tokenization and

ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal

You are here: Home / Cryptocurrency News / ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal Ondo Finance (ONDO) is gaining bullish momentum after confirming a breakout from its downtrend, with analysts watching for continued strength for the ONDO price. Meanwhile, its partnership with Japan’s SBI Group advances real-world asset tokenization and

Payroll Tax Obligations for Small Businesses

As a small business owner, you face various payroll tax obligations that can impact your bottom line. Comprehending what constitutes payroll taxes, the responsibilities you have as an employer, and the deadlines for payments is fundamental. From FICA contributions to unemployment taxes, managing these requirements accurately is vital. Failure to comply could lead to penalties

Newsletter

Don't miss

8 UNESCO-listed rock-cut religious sites you should visit at least once

8 UNESCO-listed rock-cut religious sites you should visit at least once For centuries, communities have carved places of worship, monasteries, shrines and monumental sculptures into cliffs and hillsides. Today, these rock-... 1/8 Ajanta Caves, Maharashtra, India | A UNESCO World Heritage Site since 1983, the Ajanta Caves comprise 30 rock-cut Buddhist monuments dating from the

Top Cryptos Other Than Bitcoin and Ethereum Poised to Benefit From the CLARITY Act

The upcoming CLARITY Act is widely expected to reshape the U.S. crypto market by providing regulatory clarity for digital assets. While Bitcoin (BTC) and Ethereum (ETH) are likely to remain the primary institutional beneficiaries, several altcoins could also gain from increased institutional participation. From cryptos with active ETF ambitions to blockchain ecosystems powering tokenization and

ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal

You are here: Home / Cryptocurrency News / ONDO Price Eyes $0.665 After Breakout and Major SBI Tokenization Deal Ondo Finance (ONDO) is gaining bullish momentum after confirming a breakout from its downtrend, with analysts watching for continued strength for the ONDO price. Meanwhile, its partnership with Japan’s SBI Group advances real-world asset tokenization and

Payroll Tax Obligations for Small Businesses

As a small business owner, you face various payroll tax obligations that can impact your bottom line. Comprehending what constitutes payroll taxes, the responsibilities you have as an employer, and the deadlines for payments is fundamental. From FICA contributions to unemployment taxes, managing these requirements accurately is vital. Failure to comply could lead to penalties

5 Proven Strategies for Ecommerce Customer Acquisition

If you’re looking to boost customer acquisition for your eCommerce business, you need a clear plan. Start by leveraging targeted paid ads to connect with users ready to buy. Don’t overlook SEO, as it enhances your organic visibility. Consider email marketing with segmented lists for more personalized outreach. Collaborate with influencers to reach niche audiences

Want Your Business to Be Seen Everywhere? Meet Tonia Ryan, Creator of Fix Your Search

Some people are good at their jobs. Then there is Tonia Ryan, who has turned “getting found online” into something close to magic. She is the creator of Fix Your Search, and if you have ever wondered why some businesses pop up everywhere while others seem invisible...

Grey Business processes $61 million as stablecoins dominate payments

Grey Business enables startups and SMEs to open US Dollar (USD) corporate accounts, send and receive international payments, convert currencies, and transact using stablecoins such as USDC and USDT...

Utah Marketers to Host Free Business Networking Event in Layton on June 24

The custom web design company is hosting free monthly networking events for Northern Utah business leaders, with the next event scheduled for June 24 from 4 to 6 p.m. Utah Marketers is hosting a free local business networking event on June 24 from 4 to 6 p.m. at the company’s Layton office. The event is