Using WebGPU and Dawn for Native Cross-Platform 3D Graphics in a JUCE Plugin
The current state of native cross-platform 3D graphics rendering inside an audio plugin is a regular source of debate in the audio development community. While OpenGL still seems to be the go-to API for JUCE developers, Apple’s deprecation of OpenGL in favor of their own Metal API has left developers to choose between options that each introduce compromises. Vulkan for instance is the industry-standard for Windows, but requires MoltenVK, and a loss of some features, on Mac; Metal and DirectX are specific to their platforms; and while web options exist for desktop applications that utilize WebView, this approach introduces plugin-related issues such as browser engine load times and key swallowing on musical typing. Ironically, it is an API with the name “web” in it that might very well be the native cross-platform solution audio plugin developers are in search of.
This talk details the benefits of using Google’s Dawn C++ implementation of WebGPU for creating truly native cross-platform C++ graphics inside a JUCE plugin. This includes a high-level overview of the API and a case-study that utilizes WebGPU / Dawn inside an instrument built with JUCE. This example will touch upon converting your GLSL shaders into WGSL, hot reloading of shader files, and thread-safe communication with audio parameters and uniforms.
Erik Jourgensen
Founder / Developer
Animated Instruments
My name is Erik and I am an audio software developer working on musical instruments with 3D user interfaces. I am primarily working with C++, JUCE, and WebGPU / Dawn. I have released on instrument under my brand, Animated Instruments, and I have consulted on projects such as Eclipsa Audio.
Prior to working in audio technology, I spent over a decade as a professional music composer contributing to projects by A24, LA Metro, Disney Interactive, and Brandon Sanderson; and I have taught college music technology courses at the Los Angeles Recording School.