Running a 4x video super-resolution network in the browser with hand-written WebGPU shaders A developer running a small video upscaler site built a hand-written WebGPU inference engine that runs a 34-layer, 3×3 convolutional super-resolution network entirely in the browser, using planar f16 storage buffers, vec4-packed weights, double-buffered halo tiles, and fused bias/PReLU epilogues. The engine falls back to f32 kernels on adapters lacking shader-f16, and tiles frames with 34 px of overlap context to avoid seams at a roughly 32% compute overhead. The developer reports f16 mean error of about 0.3/255 versus an fp32 reference. I run a small video upscaler site. The free tier does the whole job on the visitor's GPU, so the interesting engineering problem is: how do you push an entire video through a 34-layer convolutional network in a browser tab without freezing the machine? This post is about the inference engine. I'm leaving the specific network out on purpose; what matters is the shape of it, because the shape is what dictates the kernel design: That works out to roughly 1.2 million multiply-accumulates per input pixel. A single 1080p frame is 2 million pixels. Multiply by 30 fps. It's a lot of math, and it all has to happen in compute shaders. I did, at first. ORT's WebGPU backend is good and I still use it for a couple of smaller models. For this one I ended up writing the engine by hand, for three reasons: The trade-off is real: you own every bug, including driver bugs. Activations are planar CHW in array