Exploring Modern Shader Technologies and Their Capabilities with WebGPU
Kavalans, Andrejs (2025)
Kavalans, Andrejs
2025
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2025060319815
https://urn.fi/URN:NBN:fi:amk-2025060319815
Tiivistelmä
Shaders are languages that graphical processing units understand, and it is the way to program these for many purposes. A graphical processing unit can make fast calculations in a parallel manner. The main application of shaders is graphical manipulations of a large amount of data that must be processed eye-blink fast to maintain modern applications of graphics that look quite close to visual replicas of the real world. For these calculations, parallel computation is required, and this type of computation can be initiated from web browsers. This thesis describes emerging state-of-the-art technology of WebGPU that works as API accessible with web browsers to run programmed shaders on various systems by writing code only in WGSL.
In this thesis, WebGPU’s capability of running shaders in browsers or natively, with the advantage of cross-platform supports is described. WebGPU was specifically designed to unify shader programming on many platforms, in comparison to its predecessor WebGL, which targeted one platform that was usable from several operating systems. Noticeable difference between WebGPU and WebGL is that with WebGPU it is possible to use compute shaders and shaders of all kinds as well that gives possibility to program not only graphical applications, but initiate many kinds of computing with GPU, one example is decentralised machine learning, e.g. application would be training models with data that should not be transmitted from the machine of a client, while all the resources to initiate machine learning itself could be delivered remotely. One aspect of WebGPU is the possibility to run with native shader APIs like Vulkan, Metal, DirectX and so on. At the time of writing the thesis WebGPU does not work with all popular browsers yet and thesis has goal to explore possibilities of the technology to increase interest of such.
Thesis considers the historical aspect of shader technology that is crucial for understanding development and forecasting its paths. Due the fact that there is no unifying technology for all shader applications, potentially WebGPU will become such, this thesis tries to explain this. Incredible parallel computation power is accessible in every consumer computer and this thesis describes methods of how it is possible to make use of this computational power. The thesis describes the most crucial steps in the development of shader technology and suggests several useful workflows for GPU usage in web environment: advanced graphics for web, precise data representation of big data sets and machine learning.
In this thesis, WebGPU’s capability of running shaders in browsers or natively, with the advantage of cross-platform supports is described. WebGPU was specifically designed to unify shader programming on many platforms, in comparison to its predecessor WebGL, which targeted one platform that was usable from several operating systems. Noticeable difference between WebGPU and WebGL is that with WebGPU it is possible to use compute shaders and shaders of all kinds as well that gives possibility to program not only graphical applications, but initiate many kinds of computing with GPU, one example is decentralised machine learning, e.g. application would be training models with data that should not be transmitted from the machine of a client, while all the resources to initiate machine learning itself could be delivered remotely. One aspect of WebGPU is the possibility to run with native shader APIs like Vulkan, Metal, DirectX and so on. At the time of writing the thesis WebGPU does not work with all popular browsers yet and thesis has goal to explore possibilities of the technology to increase interest of such.
Thesis considers the historical aspect of shader technology that is crucial for understanding development and forecasting its paths. Due the fact that there is no unifying technology for all shader applications, potentially WebGPU will become such, this thesis tries to explain this. Incredible parallel computation power is accessible in every consumer computer and this thesis describes methods of how it is possible to make use of this computational power. The thesis describes the most crucial steps in the development of shader technology and suggests several useful workflows for GPU usage in web environment: advanced graphics for web, precise data representation of big data sets and machine learning.