Eadem ubique.
— THE SAME EVERYWHERE —
W3C GPU · Google · Apple · Mozilla · 2018 — 2023
WGSL · WEBGPU · COMPUTE-CLASS · TRANSLATES TO SPIR-V · MSL · HLSL · NAGA
OSL describes a surface and lets the renderer ask questions. WGSL doesn't describe — it computes. A WGSL compute shader is a kernel: a function dispatched in parallel across thousands of GPU threads. The same kernel runs on Vulkan, Metal, DirectX, and the browser — translated through SPIR-V, MSL, HLSL, and naga IR. The shader is the same everywhere. Below: a kernel running live on this page.
// the entire kernel — one function, dispatched in parallel @compute @workgroup_size(8, 8) fn step(@builtin(global_invocation_id) id : vec3u) { let p = vec2i(i32(id.x), i32(id.y)); let uv = sample(p); let lap = laplacian(p); let r = uv.r * uv.g * uv.g; state[index(p)] = vec2f(uv.r + (Du*lap.r - r + feed*(1.0 - uv.r))*dt, uv.g + (Dv*lap.g + r - (feed + kill)*uv.g)*dt); }
The promise is portability with safety. No undefined behavior, no out-of-bounds reads, no uninitialized memory — the spec forbids all three. The browser is the harshest sandbox, and WGSL is the first shader language designed to live in it.
OSL was for offline path tracers asking three questions of a closure. WGSL is for real-time compute asking one question, in parallel, of every cell at once.
w3.org/TR/WGSLtint (Google) · naga (Mozilla)~70% global browser support · 2026| 2017 | Apple proposes WebGPU at Khronos. The web has WebGL but it's a thin wrapper over a 2010 desktop API. |
| 2018 | W3C GPU for the Web Community Group forms. Apple, Google, Mozilla, Microsoft agree: a new shading language is needed. |
| 2020 | Initial WGSL drafts. "WebGPU Shading Language." Designed for portability — must compile to SPIR-V (Vulkan), MSL (Metal), HLSL (DirectX). |
| 2022 | WGSL spec freezes. Origin trial in Chrome. First production WebGPU apps ship. |
| 2023 | WebGPU stable in Chrome 113. WGSL ratified. WebGL's successor lands. |
| 2024 | Safari ships WebGPU in Tech Preview. Firefox enables behind flag. Mobile WebGPU lands on Android Chrome. |
| 2025+ | WebGPU compute hits ~70% global browser support. Three.js WebGPURenderer matures. ML-in-the-browser becomes routine via WGSL kernels. |
| ∞ | Eadem ubique. One kernel. Every machine. The translation surface is the language. |
Browser-class compute. Portable across four backends without rewriting a line. The shader is the kernel; the kernel is the same; the translation is the spec.