r/webgpu • • 1h ago

vulkan-py easymode. all the boilerplate is in easy.py. vulkan-py fork https://github.com/billyblackburn/vulkan-py-easy/tree/main

Thumbnail reddit.com
1 Upvotes

I made this after starting with wgpu-py and then found vulkan-py but preferred the wgpu-py terseness


r/webgpu • • 1d ago

WebGPU every day this month

18 Upvotes

I've been participating in #codevember, everyday i'm building a new 3D web experience with WebGPU. I thought some folks here might find it interesting. All open sourced.

Day 9's word was "Membrane".

You can play with it here: https://adamwebsite.com/codevember/09-membrane
Find the code here: https://github.com/acher249/codevember-2026
Find all of them here: https://adamwebsite.com/codevember/

Let me know what you think! 😄


r/webgpu • • 2d ago

Bedroom GI Showcase

50 Upvotes

Hi! I wanted to share a new real-time bedroom showcase highlighting our latest global illumination technology, powered by WebGPU.

Fully dynamic lighting, realistic indirect illumination, and natural light bouncing throughout the scene, all running directly in the browser.

Recorded on a MacBook M4 at 60fps / 15ms GPU/frame.

X Post

Youtube video

Scene from Brandon Lerry ‪@brandonlerry‬


r/webgpu • • 2d ago

5,000 live DOM screens drawn with WebGPU, still clickable and typeable

16 Upvotes

How it works: Chrome 157 has an experimental API, drawElementImageToTexture, that rasterizes a real DOM element into a GPU texture. gpucanvas packs screens into a texture atlas with it and draws every visible one in a single instanced draw call. The DOM stays live, so React state, inputs and clicks still work. The browser just doesn't paint it.

The fps meter is uncapped (vsync off). In the close-up it reads in the thousands because one screen is in view. With all 5,000 in view it runs about 115 to 330.

The cursors are scripted agents, a stress test for many edits at once.

Needs Chrome 157+ with chrome://flags/#canvas-draw-element.

Code (MIT): https://github.com/berkantay/gpucanvas

Built with help from Claude Code.


r/webgpu • • 2d ago

A real-time 3D lattice Boltzmann wind tunnel on a phone, running on WebGPU inside a web view

1 Upvotes

I shipped an iOS app where the whole fluid solver runs on WebGPU. You put a car in a 3D wind tunnel, change the speed from 10 to 500 km/h, and see smoke, streamlines and surface pressure update live.

The app is a Svelte front end in a Capacitor web view. The lattice Boltzmann solver and the rendering both run on the phone's GPU through WebGPU, so there is no native compute code for the simulation.

It is a visualization for fun, not engineering CFD. The drag numbers are estimates from a simplified model.

iOS is out now; Android is still in testing. I'm happy to answer questions about running WebGPU compute in a mobile web view.

https://apps.apple.com/app/id6822034101


r/webgpu • • 3d ago

should i make a dataframe and numpy package for wgpu-py. i have it wotking on my amd gpu?

0 Upvotes
  • something like nvidia rapids? on my steamdeck btw. it even hss subgroups ..


r/webgpu • • 9d ago

PeerBrush: partial texture updates for a desktop paint canvas with Rust and wgpu

Post image
0 Upvotes

PeerBrush is a GPLv3 desktop painting app built in Rust with egui and wgpu. One detail that may be useful if you’re building an interactive raster canvas: when a brush preview returns a dirty rectangle, the UI copies just those RGBA rows into a tightly packed buffer and calls TextureHandle::set_partial at the rectangle’s origin. If the canvas size changes or there’s no usable rectangle, it falls back to a full texture update.

The upload optimization sits on the display side. The editor still keeps the current preview pixels, and it commits the brush gesture to undo history when the gesture ends. The demo shows the result in the actual editor, including the optional MCP workflow.

I’d be interested in how other wgpu editors handle this tradeoff for sparse strokes: a single dirty rectangle, a set of smaller tiles, or something else?

Source: https://github.com/Deftr0y/PeerBrush

63-second demo: https://peerbrush.com/assets/peerbrush-trailer-v2.1.mp4

Disclosure: posted on behalf of PeerBrush. The project and this write-up used AI assistance.

Workspace screenshot: https://peerbrush.com/assets/showcase/workspace-golden-hour.webp


r/webgpu • • 9d ago

UCANVAS Studio brush v0 Demo

1 Upvotes

r/webgpu • • 10d ago

Live ASCII art on WebGPU

Thumbnail
gallery
14 Upvotes

Hey folks, I ported my image-to-ASCII playground to WebGPU and it now keeps up with a webcam at 60 fps.

Quick rundown: a histogram pass for contrast, then one 64-thread workgroup per text cell. Each thread tries one character, and a reduction picks the best match. Then I read the cells back and draw them with a regular 2D canvas.

Funny gotcha: I first drew the text in a fragment shader with a glyph atlas, but it never quite matched the browser's own text rendering (light text on dark comes out a touch bolder). Reading back the cells turned out to be cheap enough, so I just went with that.

Try it with your camera here: https://adrianmato.com/blog/design/coding/turn-any-image-into-ascii-art/


r/webgpu • • 10d ago

A plasma motion camera shader in my WebGPU shader toy

Thumbnail vester.si
1 Upvotes

I like making fun shaders for realtime camera effects, and this one is my favorite one yet, it reminds me of the old Plasma Pong game, if any people of culture are here to remember it :)

Hope you enjoy. Fun to distract kids also.

Best on a large screen with a camera.


r/webgpu • • 13d ago

Qwen3.5-2B at 620 tok/s inside Chrome: model-specific WebGPU kernels, 6.6× WebLLM on the same model

5 Upvotes

I built a browser LLM engine that's specialized per model rather than generic: Rust compiled to wasm, plus hand-written WGSL kernels for Qwen3.5-2B (Gated DeltaNet + gated attention) and MiniCPM5-2B.

Same model, same chat prompts, greedy, Chrome 156:

webyIQWebLLM 0.2.87transformers.js 4.3
RTX 5080 generation620 tok/s (417 without speculation)9431
RTX 5080, ~1k-token prompt0.20 s0.81 s~129 s
AMD 2-CU iGPU generation37 tok/s4.7crashed

What's in it:

  • fused int4 (GPTQ, group 32) × int8 GEMV/GEMM, with dot4I8Packed and subgroups;

  • a decode loop that stays on the GPU (argmax on GPU, pipelined readback);

  • speculative decoding with Qwen3.5's built-in MTP head. Drafts are verified on the GPU, so the output is identical to greedy. It turns itself off where it doesn't pay, e.g. on the iGPU;

  • weights at +2.4% WikiText perplexity vs bf16, 1.1 GB.

Fun side effect: at this speed a 2B model can drive web pages through the DOM at 0.2–0.4 s per step. There's a browser-agent demo and a side-panel extension for Chrome/Edge.

Caveats: it's a prototype, tested on Windows, and Safari/mobile are untested.

Demo: https://rtx527896828.github.io/webyIQ/ · Code (Apache-2.0): https://github.com/rtx527896828/webyIQ · Weights: https://huggingface.co/tixiren/Qwen3.5-2B-webyIQ


r/webgpu • • 12d ago

Qwen3.5-2B at 620 tok/s inside Chrome: model-specific WebGPU kernels, 6.6× WebLLM on the same model

2 Upvotes

I built a browser LLM engine that's specialized per model rather than generic: Rust compiled to wasm, plus hand-written WGSL kernels for Qwen3.5-2B (Gated DeltaNet + gated attention) and MiniCPM5-2B.

Same model, same chat prompts, greedy, Chrome 156:

webyIQWebLLM 0.2.87transformers.js 4.3
RTX 5080 generation620 tok/s (417 without speculation)9431
RTX 5080, ~1k-token prompt0.20 s0.81 s~129 s
AMD 2-CU iGPU generation37 tok/s4.7crashed

What's in it:

  • fused int4 (GPTQ, group 32) × int8 GEMV/GEMM, with dot4I8Packed and subgroups;

  • a decode loop that stays on the GPU (argmax on GPU, pipelined readback);

  • speculative decoding with Qwen3.5's built-in MTP head. Drafts are verified on the GPU, so the output is identical to greedy. It turns itself off where it doesn't pay, e.g. on the iGPU;

  • weights at +2.4% WikiText perplexity vs bf16, 1.1 GB.

Fun side effect: at this speed a 2B model can drive web pages through the DOM at 0.2–0.4 s per step. There's a browser-agent demo and a side-panel extension for Chrome/Edge.

Caveats: it's a prototype, tested on Windows, and Safari/mobile are untested.

Demo: https://rtx527896828.github.io/webyIQ/ · Code (Apache-2.0): https://github.com/rtx527896828/webyIQ · Weights: https://huggingface.co/tixiren/Qwen3.5-2B-webyIQ

In depth: https://medium.com/@tixiren/running-a-2b-llm-at-600-tokens-s-in-the-browser-e5237f99c8ff


r/webgpu • • 14d ago

got TTS, whisper and a small LLM all running in the browser for a video tool, cross-browser determinism is killing me though

1 Upvotes

been building a thing that makes narrated cartoon videos completely client side, webgpu with wasm fallback, tested on a 16gb m4 air. kokoro for voice, whisper for captions, webllm for drafting the script, then it renders frame by frame in a worker and encodes with webcodecs.

on chrome the same project gives byte-identical mp4s every run, which I was pretty happy about. firefox and safari are a different story and I haven’t figured out yet how much of that is the encoder vs canvas rasterisation.

anyone tried getting deterministic output out of webcodecs across browsers? or is that a lost cause

repo if you want to look (it’s mine, AGPL): https://github.com/BeyondITL/contentine-create


r/webgpu • • 21d ago

https://riversandbox.com/ - A project with no point but kinda fun

5 Upvotes

"I" actually AI built this website riversandbox.com which is essentially a river simulation generator that allows users to manipulate terrain and see how a river flows.

Too lazy to write a full prompt. go check it out and let me know what you think. Also I have no idea how well it will run on different machines/gpu's but input would be great.


r/webgpu • • 22d ago

WebGPU card renderer from one illustration: does the depth hold up in motion?

Thumbnail
reddit.com
0 Upvotes

r/webgpu • • 25d ago

PlayCanvas vs ThreeJS Performance Benchmark

Post image
9 Upvotes

r/webgpu • • 29d ago

A spinning black hole ray traced in raw WebGPU at 60 fps (no engine, single file)

40 Upvotes

Live: https://kerr-black-hole-roan.vercel.app

- One fragment-shader trace pass writes two render targets: disk light and visibility, plus each ray's escape direction and redshift (rgba32float).

- A full-resolution sky pass draws the lensed stars and Milky Way, then bloom, auto-exposure and AgX tone mapping.

- Resolution adapts with timestamp-query. It keeps probing upward while under budget, because on Apple Silicon a light load lowers the GPU clock and would trap the resolution low.

- Render targets are allocated in 10% steps and drawn into a sub-rectangle, so resolution changes rarely reallocate them.

Built with Claude Code (Opus 5.5). It's one 119 KB index.html that also works from file://.

Code: https://github.com/SkyWalkerPS/kerr-black-hole


r/webgpu • • 29d ago

A 4 KB WebGPU page: Minecraft 4k remake where worldgen, physics and rendering all live in one compute shader (using the new immediates)

17 Upvotes

https://4k-minecraft.ayfri.com · source: https://github.com/Ayfri/4k-minecraft

Byte-saving WebGPU tricks it relies on:

  • the canvas configured as an rgba8unorm storage texture, written directly by the compute shader (no render pipeline at all)

  • GPUBuffer and the canvas GPUTexture passed directly as binding resources

  • uniforms as immediates (setImmediates + var<immediate>, no requires directive)

Tested on Chrome 155 / Windows without flags. Firefox 158 runs everything except immediates (naga: "Capability IMMEDIATES is not supported"), Safari 26 has no immediates either, and Chrome on macOS has no rgba8unorm canvases (crbug 40823053).

I've only tested on Windows. If you're on Chrome or Edge 150+ on Linux or ChromeOS, I'd love to know if it runs on your GPU.


r/webgpu • • Oct 17 '26

I built a WGSL extension for VS Code that validates shaders the way Chrome does. Plus completion, navigation, rename and formatting (in template strings too)

Post image
22 Upvotes

I wasn't happy with the existing WGSL VS Code extensions, so I made my own. It closely follows Chrome's compiler (Tint) on diagnostics, provides full semantic highlighting, completion, rename refactoring, type inference, specs and layout details on hover and other useful stuff.

Figured someone else might find it useful:

Feedback and bug reports are welcome!


r/webgpu • • 29d ago

Tropical island rendering in my custom WebGPU engine

11 Upvotes

I've been working on the island environment for RED SKIES AT DAWN in Junklab Engine. Three.js handles CPU scene objects, geometry, maths and asset loading; the renderer and shaders use WebGPU directly.

The scene combines procedural terrain and vegetation placement with authored paths, landmarks and coastal effects. The cliff spray responds to rising incoming waves at placed contact strips. Shelter inside the cove is authored too.

One recent rendering issue was grain in the storm clouds. With the camera and scene time held fixed, increasing the reference cloud march budget from 64 to 256, then 512 steps reduced the grain. The higher limit is for offline capture; interactive rendering keeps its lower budget.

This reel was captured offline on Mac at Ultra quality, with vegetation shadows and ambient occlusion enabled. Ocean and scene time are synchronised for each output frame. It's a visual development capture, so the video frame rate isn't a gameplay performance measurement.

AI use: AI-assisted coding and post copy, plus some AI-generated reef textures.

If you'd like to follow the game, you can wishlist RED SKIES AT DAWN on Steam:

https://store.steampowered.com/app/5268580/


r/webgpu • • 29d ago

Unreal Engine 5.8.3 in Your Browser! | WebGPU + WebAssembly Demo

Thumbnail
youtu.be
2 Upvotes

r/webgpu • • Oct 16 '26

I'm building Uverse - a browser-based game engine with collaboration and native DirectX/Metal/Vulkan builds!

7 Upvotes

r/webgpu • • Oct 16 '26

Koi pond from 2.5 to 3D interactive Zen Garden

Thumbnail reddit.com
1 Upvotes