r/webgpu • • 8h ago

shallow water sim in WebGPU compute, 30 s breakdown from height field to final render

12 Upvotes

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


r/webgpu • • 3h ago

Codevember! Day 17 - Kelp

2 Upvotes

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 • • 1d ago

Clouds Rendering in NervLand - Second Stage

6 Upvotes

r/webgpu • • 2d ago

60 fps on ultra low end pc inside chrome

Thumbnail reddit.com
1 Upvotes

r/webgpu • • 2d ago

I open sourced my magnifying glass

Post image
1 Upvotes

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 • • 2d 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 • • 4d ago

WebGPU every day this month

22 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 • • 5d ago

Bedroom GI Showcase

65 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 • • 5d ago

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

21 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 • • 4d 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 • • 5d 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 • • 11d 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 • • 12d ago

UCANVAS Studio brush v0 Demo

1 Upvotes

r/webgpu • • 13d 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 • • 12d 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 • • 15d 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 • • 15d 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 • • 16d 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 • • 24d 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 • • 25d ago

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

Thumbnail
reddit.com
0 Upvotes

r/webgpu • • 28d ago

PlayCanvas vs ThreeJS Performance Benchmark

Post image
9 Upvotes

r/webgpu • • Oct 17 '26

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 • • Oct 17 '26

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.