Introducción

Overview

Welcome to Practical WebGPU Graphics. WebGPU is the next-generation graphics API that is being developed by the W3C GPU for the web Community Group with engineers from Apple, Google, Microsoft, Mozilla and others. It is a future web standard for graphics and compute, aiming to provide modern 3D graphics and computation capabilities with the GPU acceleration. This book will provide all the tools you need to help you create advanvced 3D graphics and GPU computing on the Web using this new WebGPU graphics API. I hope that this book will be useful for web developers, web graphics creators, computer graphics programmers, web game developers, and students of all skill levels who are interested in graphics developments on the Web.

Unlike WebGL that is based on OpenGL, WebGPU is not a direct port of any existing native API. It is based on concepts in Vulkan, Metal, and DSirect3D 12 APIs and is intended to provide high performance on those modern graphics APIs actors mobile and desktop platforms.

In order to understand WebGPU technology, we need to review a brief history of native graphics technologies. The first comes with OpenGL. It is a low-level high performance graphics technology, which WebGL is based on. It was originally developed in the early of 1990s. Since then, many graphics applications based on OpenGL have been developed. In fact, modern GPU works very differently to how the original OpenGL did — but many core concepts og OpenGL had not changed.

As GPUs became more complex and powerfu, the graphics driver ended up having to do a lot of extremely complex work. This made graphics drivers notoriously buggy, and in many cases slower too, since they have to do all the work on the fly. To improve OpenGL’s performance, Khronos, the group behind OpenGL, proposed a new, completely redesigned modern graphics API called Vulkan that was released in 2016. Vulkan is even more low-level, faster, simpler, and a much better match for modern hardware.

However, using Vulkan also meant that applications had to rewrite all their graphics code completely in order to support it. This kind of tectonic shift in technology takes years to play out, and as a result, there is still a lot of OpenGL out there.

While Vulkan is designed to be a standard API that is able to work on all systems, as has long been the case with standards, Apple also came up with Metal for iOS and macOS, while Microsoft came up with DirectX 12 for Windows and Xbox. Both are more or less the same idea as Vulkan: new, lower-level APIs that throws out all the historical baggage and starts with a clean slate design that much more closely matches how modern GPU hardware works.

With the graphics community moving on to this new generation of APIs, the question was then what to do on the web. WebGL is essentially OpenGL with many of the same pitfalls, while high-performance web game engines still stand to benefit a lot from the new generation of graphics APIs.

Unfortunately, unlike OpenGL, Vulkan has run into trouble getting true cross-platform

What this Book Includes

Is this Book for You?

What Do You Need to Use this Book?

How this Book Is Organized

Use Code Examples

Customer Support

Back to top