Stefan Brandmair
TU Wien
THU afternoon
A workshop where the participants build their own simple shader debugger for WebGPU, with a variable inspector and breakpoints.
The starting point will be a website with a textfield for the fragment shader code and rendered output.
The first debug tool will be “indirect drawing”. In the shader, one can write quads to a buffer. And with an indirect draw call, one can display those quads. This then naturally gets extended to rendering text.
The second debug tool will follow a different route. We will write to a buffer, but then read the buffers back on the CPU where we display the output. By using shader parsing, we will dynamically inject “write variable value to buffer” statements in the entire shader. That way, we can give the illusion of having an actual variable inspector.
And a breakpoint is just “only print the variables up until this point”. So it will not be a live debugger, but rather a replay-recorder.
Bring your laptops with a WebGPU capable browser to start debugging right away.
|
Stefan Brandmair is a master’s student at TU Wien, specializing in computer graphics tooling, with a focus on the WebGPU Shading Language (WGSL). His work explores compilers, modular shaders, and resilient, crash-free IDE tooling for modern GPU programming. As an invited expert to the W3C GPU for the Web Working Group, he contributes a little bit to the evolution of WebGPU and WGSL.