The story of WebGPU — The successor to WebGL

I was working the other day on an .obj file parser and wanted to test it. An .obj file just contains a collection of vertecies and faces, that together compose a 3D object. Anyways I wanted to test it by rendering the final result. I thought that it would be easy enough to do so with a bunch of divs that use 3D CSS transformations. After all it’s just a simple object, right? Long story short, this is the best I could pull off:

  • What is WebGPU?
  • Why is it better?
  • The future of graphics on the web.

The history of WebGL

At 2009 a non profit organization called Khronos group started a WebGL working group, where representative from Apple, Google, Mozilla and Opera were also involved. The purpose of WebGL was to support native 3D capabilities on the browser. Like the name implies, it runs on the web and uses OpenGL as its API. Vladimir Vukićević, the mind behind the initial prototype of WebGL, was targeting OpenGL because there were already OpenGL developers outside the web ecosystem, and finding them would be relatively easy. He also claimed that “the web is not good at adopting large specs”, thus he was aiming for something familiar. Here’s a video from 2009 showing Vladimir elaborating about WebGL:

Thoughts on Flash (ft. Steve Jobs)

For a while there was a debate on whether people should keep using Flash or WebGL. Flash was used across many websites; it was reliable but required an external plugin installation and wasn’t native to the web. In a sense it also gave Adobe all the power, since it wasn’t based on an open specification. In 2010 Steve Jobs published an open letter called “Thoughts on Flash”. TL;DR: he was very against it, and absolutely was not willing to support it on any of Apple’s devices. The letter is a few pages long, but Jobs knew that I’m gonna write this article and prepared a conclusion statement in advance (sarcasm):

What went wrong?

I believe that back in 2006 when Vladimir was adopting the OpenGL specification he had good intentions. OpenGL was not platform specific and sounded like a viable option, because it was available on any platform, unlike its competitor, DirectX. However, things didn’t turn out as expected.

Introducing — Vulkan (aka OpenGL Next)

WebGPU to the rescue

This is where it all comes down to. WebGPU will be based on Vulkan, which will result in greater performance, and will make it an inseparable part of the native ecosystem due to Vulkan’s standardized API. WebGPU is still in very early stages of development, but it’s a huge stepping stone. The implementation status of WebGPU can be seen in gpuweb’s Github repo.

The future of graphics on the web

For a change, Unreal engine 4, one of the most popular game development engines alongside Unity, might become available again on the web again. As of Unreal Engine 4.24 (31 May, 2019), support for the HTML5 platform has been migrated out of the engine. This really tells us that the potential of WebGL is at its peak and we aren’t gonna see anything new from it.

Eytan is a JavaScript artist who comes from the land of the Promise(). His hobbies are eating, sleeping; and open-source… He loves open-source.