Hasty Briefsbeta

WebGPU and the Price of Compiling WGSL

4 hours ago
  • #ShaderCompilation
  • #WebGPU
  • #WGSL
  • Introduction of a WebGPU tool to measure WGSL shader compilation time and complexity.
  • Tool features include a rotating triangle demo, shader complexity sliders, and device/adapter info.
  • Shader complexity is increased via sliders affecting functions, statements, and expression depth.
  • Example shows a 5KB shader generated with all sliders set to 8.
  • Device and adapter info section highlights differences between announced and actual limits.
  • Motivation includes testing the boreDOM framework for handling WebGPU complexity without bundling.
  • Observations note significant differences between cold and warm compilation times.
  • Future plans include introducing a rendering engine inspired by boreDOM's approach.