Master's Thesis

Performance comparison of WebGPU and WebGL in the Godot game engine

Abstract showcase

Overview

Project type

Team project

Year

2023

Project Duration

20 weeks

Context

Blekinge Institute of Technology "Degree Project for Civil Engineers"

Tools

WebGPU, WebGL, Godot, WGSL, GLSL, emscripten

My responsibilities

WebGPU Rasterizer backend in Godot, WGSL to GLSL porting, WebGPU asset manager, Profiling, Writing paper

Team Members

Emil Fransson
Jonatan Hermansson

Supervisors

Yan Hu
Fritjof Cavallin
Mikael Hernvall

Full-Text Access

Impact of contributions

In this thesis, I evaluated the performance differences of the (as of june 2023) newly released WebGPU and the older WebGL API:s for rendering graphics on the web. The study was done in the context of the Godot game engine, comparing the API:s as two rendering backends under various workloads and 2D-games. The aim was to assess to what degree the modern way of setting up graphics constructs and issuing draw calls would play to WebGPU:s favor, much like how it works in native graphics API:s such as Vulkan.
The results of the thesis shines a light on the performance improvements possible by even a naive WebGPU rasterizer implementation, with speed ups typically ranging from 2-3 across the various tests and workloads. The discussion goes into detail on how the WebGPU API:s more verbose and detailed way of managing graphics constructs works in its favor over the legacy WebGL API. For full details on the work, see the access link in the previous section, where you may read the paper in full.