WebGPU gives developers modern, cross-platform access to the GPU – graphics and compute – and Uno Platform 7.0 puts it right besides your XAML, with SkiaSharp as the safety net.
The GPU in your users’ machines is a monster – thousands of cores, built to do one thing at staggering scale. And for most of the web’s history, we’ve been peeking at it through a keyhole.
That has changed. WebGPU has been shipping in every major browser for more than a year now, and with Uno Platform 7.0 it’s no longer just a browser story. It’s a .NET story, a cross-platform story, and – let’s be honest – a pretty fun one.
So what is WebGPU, really? Why should you care if you build business apps and not games? And what happens when you mix it straight into XAML? Let’s unpack ..
WebGPU Basics
What is WebGPU
WebGPU is a W3C-standardized API for cross-platform, efficient access to the GPU. It sits on top of whatever modern graphics stack the system already has – Vulkan, Metal, or Direct3D 12 – and gives you one consistent way to talk to all of them. It’s designed to supersede WebGL as the main graphics standard for the web.
Despite the “Web” in the name, it isn’t browser-only. Native implementations are usable from Rust, C++, and C, and runtimes like Deno and Node.js can use it too. The browser is where it started – not where it ends.
To make the idea click, picture a stadium card stunt. Thousands of fans each hold up a colored card, and from across the arena the crowd forms one image. The organizer doesn’t hand out 50,000 individual instructions. They hand out one sheet – “look at your seat number, work out your color” – and every fan follows it with their own seat as the input.
That’s a GPU:
- 🏟️ The crowd is thousands of tiny cores
- 📋 The instruction sheet is a shader – one small program, run by every core
- 🪑 The seat number is each core’s input – a pixel position, a particle index, a vertex
WebGPU is how you hand the instruction sheet to the stadium.
Why developers should care
The reality is you don’t need to be building a game for this to matter.
- Modern GPU access. WebGL was designed around an older generation of graphics APIs. WebGPU maps to how modern GPUs actually work.
- Compute, not just graphics. First-class support for general-purpose GPU computation – libraries like ONNX Runtime and Transformers.js use it for machine learning inference in the browser. Particle systems, image processing, simulation – all fair game.
- A real ecosystem. Three.js, Babylon.js, PlayCanvas, and Unity all support it.
- One API, every GPU stack. The same code runs over Vulkan, Metal, or Direct3D 12 depending on where it lands.
The tradeoff? Explicit control means more setup. Power with ceremony.
WebGPU Shading Language (WGSL) Basics
Shaders in WebGPU are written in WGSL, specified separately by the W3C. If you’ve written any Rust, the syntax will feel familiar: fn for functions, let and var for bindings, types after the name.
Back in the stadium, shaders come in three flavors:
- Vertex shaders position the corners of your shapes
- Fragment shaders decide the color of each pixel – the fan with the card
- Compute shaders skip the picture and just crunch data in parallel
Here’s a small fragment shader – every pixel works out its own color from where it sits and what time it is:
struct Uniforms {
resolution: vec2f,
time: f32,
}
@group(0) @binding(0) var<uniform> u: Uniforms;
@fragment
fn fs(@builtin(position) pos: vec4f) -> @location(0) vec4f {
let uv = pos.xy / u.resolution;
let wave = 0.5 + 0.5 * sin(uv.x * 6.0 + u.time);
return vec4f(uv.x * wave, uv.y * 0.4, wave, 1.0);
}
vec2f and vec4f are built-in vector types, @builtin(position) is the seat number, @location(0) says where the output color goes, and @group / @binding is how data from your app reaches the shader. That’s the whole mental model: one function, thousands of fans, one image.
WebGPU Implementations across Platforms
Standardization of specs
WebGPU didn’t appear overnight. The W3C “GPU for the Web” group launched in 2017, with Apple, Google, and Mozilla each bringing their own experiments to the table. The spec reached its first Candidate Recommendation snapshot in December 2024, and the latest draft landed in September 2026. WGSL has its own spec, and a compiler on each side of the fence – Tint in Google’s Dawn, Naga in the Rust world.
Three browser vendors, three native graphics APIs, years of negotiation – and the result is one API that behaves consistently across all of them. That’s rare.
The story in web browsers
By November 2025, WebGPU was supported in all major browsers:
| Browser | First WebGPU release |
|---|---|
| Chrome / Edge | Version 113, May 2023 |
| Firefox | Version 141, July 2025 (Windows first) |
| Safari | Version 26, September 2025 (macOS, iOS, iPadOS, visionOS) |
Under the hood, Chromium-based browsers use Google’s C++ Dawn, while Firefox uses the Rust wgpu library. Same spec, different engines – and platform coverage is still filling in, which is why fallback strategy comes up in a minute.
Option for native apps
The WebGPU API isn’t locked inside a browser. wgpu and Dawn both work natively, and the API follows a standard C header, webgpu.h, that native libraries implement. The same WebGPU model you’d use in a browser can drive a desktop or mobile app directly.
Which is exactly the door Uno Platform walks through.
WebGPU with Uno Platform
7.0 support
Uno Platform 7.0 ships a new WebGPU rendering backend, joining Skia as a rendering option on Windows, Linux, macOS, Android, iOS, and WebAssembly. Drawing now goes through a backend-neutral layer underneath the compositor; the WebGPU backend is built on wgpu-native on desktop and mobile, and on the browser’s own WebGPU support in WebAssembly. Depending on the scene, we’ve measured up to a 50% improvement in frames per second. And an app that uses only WebGPU ships without SkiaSharp at all – about 6 MB less uncompressed native code in WebAssembly apps.
Honest status check: WebGPU is experimental and opt-in. SkiaSharp 4 remains the default for cross-platform rendering for Uno Platform apps.
Turning it on takes two steps: add WebGpu to your UnoFeatures, then register the backend on your host builder.
First, add the feature to your project (listing Skia alongside it keeps SkiaSharp in the app, which the fallback below needs):
<UnoFeatures>Skia;WebGpu</UnoFeatures>
Then register the backend on your host builder:
var host = UnoPlatformHostBuilder.Create()
.App(() => new App())
.GraphicsBackend(WebGpuBackend.CreateGraphicsProvider())
.GraphicsBackend(SkiaBackend.CreateGraphicsProvider())
.UseX11()
.UseLinuxFrameBuffer()
.UseMacOS()
.UseWin32()
.Build();
host.Run();
The same two GraphicsBackend calls apply on every target – for example before .UseAndroid(), .UseAppleUIKit(), or .UseWebAssembly(). Wondering why Skia is registered after WebGPU? Hold that thought – it’s the next section.
Fallback options | Support across platforms
Remember the “which device, which GPU” caveat? Each backend you register is added in order of preference. When a window is created, Uno Platform tries them in that order and uses the first one that initializes. Register WebGPU first and Skia second, and an app on a browser or device without WebGPU quietly renders with Skia instead.
Always register the fallback. Register WebGPU alone and the implicit Skia default is gone – on a device where WebGPU can’t initialize, startup fails.
| Host | WebGPU |
|---|---|
| Windows, Linux (X11), Android, iOS | ✅ Yes |
| macOS | ✅ Yes, unless the host renders in software |
| WebAssembly | ✅ Yes, in browsers with WebGPU support |
| tvOS, Linux framebuffer | ❌ No |
| Windows App SDK | ❌ No – this target renders with WinUI |
Prefer to go all-in? List WebGpu without Skia and the app carries no SkiaSharp at all – smaller, but with no fallback renderer.
Powerful Rendering with XAML & WGSL mixed in
Swapping the renderer is nice. But here’s the part that made us sit up – you can bring your own WebGPU code into the middle of your UI.
Meet WebGpuCanvasElement: a control for drawing with your own WebGPU commands that sits in your layout like any other element – behind your text, next to your buttons, inside your Grid. It renders on the same WebGPU device as the rest of your app, and the backend draws its output with no copy. You subclass it and override three methods – Init to create pipelines and buffers, RenderOverride to encode each frame, OnDestroy to clean up.
XAML does what XAML is great at – layout, input, accessibility, data binding. WGSL does what the GPU is great at. Mix and match.
Two caveats worth knowing: the element only draws under the WebGPU backend (with any other, it reports that it’s unavailable – so plan a graceful fallback), and it speaks the Silk.NET.WebGPU API, so expect some unsafe code.
Example: Uno Calculator app with WGSL background
Let’s put it to work on something wonderfully ordinary: a calculator.
UnoWebGPU is a Material-styled Uno Platform calculator with an animated aurora drifting behind the keypad, drawn by a WGSL shader through WebGPU. One codebase, running on WebAssembly, desktop, Android, and iOS. The calculator itself is deliberately plain – immutable Calculator record, MVVM view model, Material theme. All the GPU work lives in one class, ShaderBackdrop, a WebGpuCanvasElement that sits behind the display and keys.
The shader is the fun part. There’s no vertex buffer – the vertex shader draws one oversized triangle covering the whole target, and the fragment shader does everything else. Every pixel layers three drifting color “blobs” over a base color, using a simple Gaussian falloff:
fn blob(p: vec2f, center: vec2f, radius: f32) -> f32 {
let d = length(p - center);
return exp(-(d * d) / (radius * radius));
}
// ... per pixel: three blobs whose centers wander with time
let b1 = blob(p, vec2f(sin(t) * 0.45, cos(t * 0.8) * 0.35 - 0.2), 0.55);
// Each palette color is a mix() between its light and dark variant
let violet = mix(vec3f(0.72, 0.62, 1.00), vec3f(0.36, 0.22, 0.78), u.dark);
color = mix(color, violet, b1 * 0.85);
A gentle domain warp makes the blobs flow like an aurora, and a soft vignette plus a touch of grain keeps banding at bay. Notice u.dark: when the user flips the app’s light/dark toggle, the view model also passes that value to the shader, so the same code swaps palettes on the fly. Buttons still click, text still scales, screen readers still work – the GPU just got a seat at the table.
And the fallback? Each platform head asks for the WebGPU backend first and Skia second. In a browser without WebGPU, the calculator works exactly the same – the backdrop simply renders nothing and the plain page background shows through. Light show politely declines.
Source: github.com/samidip/UnoWebGPU
Example: Uno Particle physics around gravity wells
Now for the one that makes the GPU earn its keep.
UnoParticles is a real-time simulation of up to 2 million particles orbiting, spiraling, and slingshotting around draggable gravity wells. All of the physics runs in a WGSL compute shader, and the whole thing is driven by plain XAML data binding. It runs from one codebase on desktop and in the browser via WebAssembly.
Every particle asks the same question each frame: how hard am I being pulled, and where am I going next? Same instruction sheet, one per fan – a textbook compute problem. Here’s the heart of it, trimmed from the real shader:
// Acceleration towards a well at offset d, for the force law picked in XAML
fn pull(d : vec2f, mass : f32) -> vec2f {
let r2 = dot(d, d) + P.softening;
let invR = inverseSqrt(r2);
var k : f32;
switch P.forceLaw {
case 1u: { k = 1.0 * invR * invR; } // 1/r (cosmic string)
case 2u: { k = 2.0; } // r (spring)
default: { k = 0.5 * invR * invR * invR; } // 1/r² (Newton)
}
return d * (k * mass * P.gravity);
}
@compute @workgroup_size(256)
fn simulate(@builtin(global_invocation_id) gid : vec3u) {
// ... for each well:
let a = pull(well.xy - p.pos, well.z);
acc += a + vec2f(-a.y, a.x) * P.swirl; // tangential kick -> spiral arms
// ... integrate velocity and position
}
Each invocation owns one particle, sums the pull of up to 8 wells, and adds a sideways “swirl” kick – rotate the acceleration 90° and straight-line infall becomes spiral arms. A negative well mass repels, so one number covers attract and repel. Particles flung off-screen respawn at random, right on the GPU, so the field never runs dry.
What makes it sing is the XAML connection. GravityParticlesCanvas extends WebGpuCanvasElement and exposes every simulation knob as a dependency property – force law, gravity, swirl, damping, trails, particle count from 16K to 2M, color palette. The side panel binds to them like any other control, and each frame the values are packed into a uniform buffer that mirrors the shader’s Params struct byte for byte. Slide the force law from 1/r² to a spring and watch two million particles change their minds mid-flight. No shader rewrite, no rebuild – just a binding.
Two design choices keep it fast. The particle buffer does double duty – the compute shader writes it, and the render pass reads that same buffer to draw, so particles never leave the GPU. And the look comes from simple tricks: a full-screen fade pass that dims the previous frame (that’s your motion trails), then instanced, additively blended sprites colored by speed.
It’s interactive too: drag a well to move it, right-click to flip attract and repel, double-tap empty space to add a well, double-tap a well to remove it. The side panel even shows the actual WGSL compute source the app is running – no curtain, nothing hidden. And like the calculator, if WebGPU isn’t available the app falls back to Skia and shows a banner explaining why.
Source: github.com/samidip/UnoParticles
Wrapup
Why WebGPU matters
WebGPU turns the GPU from something you reach through a keyhole into something you can walk right up to. One standard. Every major browser. Native implementations beyond the browser. Graphics and compute – on Vulkan, Metal, and Direct3D 12 without writing three versions of anything. That’s not a niche feature. That’s a foundation.
Wow-worthy UI, on the GPUs your users already have
Every phone, laptop, and desktop your app lands on has a GPU sitting mostly idle while it draws a few rectangles. With the WebGPU backend, your whole UI can render through it. With WebGpuCanvasElement, you can drop custom shaders and simulations right next to your XAML – on the same device, with no copy.
Backgrounds that breathe. Particle fields that react to a finger. The kind of UI that makes someone say “wait – that’s a business app?”
Uno Platform support
Uno Platform 7.0 puts this in your hands today: a WebGPU rendering backend across Windows, Linux, macOS, Android, iOS, and WebAssembly; ordered fallback to Skia so your app runs everywhere; and WebGpuCanvasElement for your own WGSL living right in your XAML. It’s experimental and opt-in – and we’d love your feedback.
The stadium is built. The instruction sheet is yours to write. We can’t wait to see what you build – Cheers developers!
Next Steps
- WebGPU Rendering Backend docs →
- WebGpuCanvasElement docs →
- What’s new in Uno Platform 7.0 →
- UnoWebGPU – the calculator with the WGSL aurora →
- UnoParticles – GPU gravity particle simulation →
- DrawingBackends sample – Skia vs. WebGPU side by side →
- Launch Uno Platform Studio Web → or download Studio Desktop →