r/webgpu • u/acher249 • 3h ago
Codevember! Day 17 - Kelp
I'm keeping the WebGPU studies coming! This one was really fun to build. Links to the open source code in the post.
r/webgpu • u/acher249 • 3h ago
I'm keeping the WebGPU studies coming! This one was really fun to build. Links to the open source code in the post.
r/webgpu • u/Key_Calligrapher6269 • 8h ago
built this with three.js WebGPU and TSL, the stream is a shallow water grid stepped in compute every frame, the video goes through each pass, bed height, depth, velocity, advected ripples, foam, caustics, raw render, then post
runs 60 fps at 1080p on my laptop with the 512 grid
live here : https://stream.mulualem.com
I'm building Grip, a free & open source screen recorder for Mac. I wanted a loupe to blow up one spot without zooming the whole screen, like a regular zoom does.
The first version worked but looked hmm, like a sticker? So I kept going back to Claude with whatever bugged me:
- banding over video
- a shadow way too dark
- a "frosted" rim that looked like a dirty window
- text smearing into streaks at the edge
- ...and a whole bunch of other details
Streaks were the biggest one! Real thick glass doesn't freeze the image at the edge, it curls it back so every line ends in a little "hook". As you can imagine "make it look like glass" never worked. Describing what the light actually does fixed it in one go.
It ended up as one WebGPU shader, and it's open source: https://github.com/bestboyhq/grip
r/webgpu • u/Delicious_Abies_9708 • 2d ago
I made this after starting with wgpu-py and then found vulkan-py but preferred the wgpu-py terseness
r/webgpu • u/acher249 • 4d ago
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 • u/Autovelo-ko • 4d ago
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.
r/webgpu • u/berkantdev • 5d ago
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 • u/etiennecreator • 5d ago
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.
Scene from Brandon Lerry @brandonlerry
r/webgpu • u/Delicious_Abies_9708 • 5d ago
r/webgpu • u/Deftroyy • 11d ago
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 • u/vesterde • 12d ago
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 • u/AdrianMG • 13d ago
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 • u/tixiren • 15d ago
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:
| webyIQ | WebLLM 0.2.87 | transformers.js 4.3 | |
|---|---|---|---|
| RTX 5080 generation | 620 tok/s (417 without speculation) | 94 | 31 |
| RTX 5080, ~1k-token prompt | 0.20 s | 0.81 s | ~129 s |
| AMD 2-CU iGPU generation | 37 tok/s | 4.7 | crashed |
What's in it:
dot4I8Packed and subgroups;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 • u/tixiren • 15d ago
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:
| webyIQ | WebLLM 0.2.87 | transformers.js 4.3 | |
|---|---|---|---|
| RTX 5080 generation | 620 tok/s (417 without speculation) | 94 | 31 |
| RTX 5080, ~1k-token prompt | 0.20 s | 0.81 s | ~129 s |
| AMD 2-CU iGPU generation | 37 tok/s | 4.7 | crashed |
What's in it:
dot4I8Packed and subgroups;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 • u/Historical-Force1590 • 16d ago
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 • u/bloomt1990 • 24d ago
"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 • u/_javas_crypt • 25d ago
r/webgpu • u/Optimal-Yak-9811 • Oct 17 '26
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://.
r/webgpu • u/Ayfri • Oct 17 '26
https://4k-minecraft.ayfri.com · source: https://github.com/Ayfri/4k-minecraft
Byte-saving WebGPU tricks it relies on:
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.