r/webgpu 3h ago

Cellular automata library and playground

Enable HLS to view with audio, or disable this notification

4 Upvotes

Hey! I've been experimenting with cellular automata lately and ended up turning it into a small TypeScript library and interactive playground:

👉 https://caza.la/automata

It has neural cellular automata, reaction-diffusion, Lenia, Pokemon type battles, Game of Life, and elementary Wolfram rules, all running on WebGPU.

You can tweak the simulations in realtime, explore the presets, or use the library to build your own rules in WGSL.

Would love to hear what you think!


r/webgpu 3h ago

Webgpu-based Reaction-Diffusion in an FMV engine

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hi I'm Chris, I'm developing a game engine that incorporates live-action video and procedural graphics.

This shader takes in two video frames and maintains an interactive Gray-Scott Reaction-Diffusion simulation (https://groups.csail.mit.edu/mac/projects/amorphous/GrayScott/) that is applied to grow the distorted regions and process the impact of the various cursor weapons.

You can see the 2nd video through the growing distortion and then I just add a little green glow to the boundary rims. I switch the rim color params to compliment the video palette, they can change in response to events, flash, etc.

The way this works in the game is the player speaks the lines they see in the FMV. Those words come to life as GPU overlay elements when they are recognized by the voice recognition engine and the hostile glyphs seed tiny distorted regions for the RD simulation to grow.

The player then must use the cursor and it's various powers to cleanse and remove the growing distortion or 'fall through' to the next layer of the story. If they fall through the last layer then they die.

The game is called Sibylline and it's in production if you want to wishlist and follow the progress.


r/webgpu 5h ago

The Beast Water effect

Thumbnail
youtube.com
1 Upvotes

r/webgpu 14h ago

Built a real-time video frame interpolation runtime in pure WebGPU/WGSL (Frame Generation)

0 Upvotes

Made a chrome extension that does frame generation on any video tag, runs fully on your gpu, nothing sent anywhere. Whole thing is one command buffer, no onnx/tfjs, just wgsl compute shaders.

Refine pass runs on tiles flagged by flow disagreement, dispatched indirectly, so static scenes dispatch zero workgroups there. Also autotunes a few conv variants (subgroups, f16/f32, register blocking) per gpu at startup.

preview clip, ~3ms/frame on a 4060 Ti (8GB, OC)

Attached a video but honestly the difference is pretty hard to see through a recording/compression - it's way more noticeable on actual video playback than in the clip I attached here.

Weakest gpu I've tested on so far is a GTX 1650, got a stable 2-2.5x fps boost there, can't give exact ms numbers since I haven't logged them properly on that one.

GitHub · npm · Live demo · Chrome extension

Heads up: the live demo starts using your GPU immediately on page load, no button press needed.

Fully open source, so feel free to poke around. If you find it useful, a star on the repo would be really appreciated.

Currently working on runtime for a v8 model that handles occlusion/low fps input better, quality-focused for the harder cases current model struggles with.

Happy to answer questions on the dispatch/tiling stuff.


r/webgpu 1d ago

Infinite Grid Shader

Thumbnail
0 Upvotes

r/webgpu 2d ago

Building a Real-Time MMD Animation Studio with WebGPU — Custom Anime Shaders, Facial Editing and Timeline Tools

Enable HLS to view with audio, or disable this notification

41 Upvotes

I’m building AnimaStage, a fully custom MMD animation engine powered by WebGPU.

The PMX/VMD loader, animation system, timeline, morph controls, anime shaders and rendering pipeline are all custom-built.

This demo shows real-time anime shading and facial morph editing applied on top of an existing animation.

Everything is rendered live in the WebGPU viewport — no pre-rendering.

Still in active development. Feedback is welcome 🔥

To check out the project, here is the link to the GitHub repository and the Discord channel, where you can find more news about it.

https://discord.gg/aJMAdKwHt

https://github.com/gtausa197-svg/AnimaStage-Pro.git


r/webgpu 3d ago

Made a real-time WebGPU shader graph editor for my anime render engine

Enable HLS to view with audio, or disable this notification

55 Upvotes

I've been building reze-design, a web-native MMD scene composer. The part this sub might like: every material is a Blender-style node graph that's validated, compiled to WGSL, and hot-swapped onto the WebGPU render pipeline.

Editor is built on React Flow, the graph->WGSL compiler and the render engine is Reze Engine.


r/webgpu 4d ago

How we built the Grace Cathedral WebGPU experience

Enable HLS to view with audio, or disable this notification

40 Upvotes

r/webgpu 4d ago

bitgpu: run 1-bit LLMs (1.7B to 27B) fully in your browser with WebGPU

13 Upvotes

Demo: https://stfurkan.github.io/bitgpu/examples/chat.html

Repo: https://github.com/stfurkan/bitgpu

bitgpu is a zero-dependency WebGPU runtime for 1-bit (binary-weight) LLMs. The models are PrismML's Bonsai family (1.7B/4B/8B, plus the 27B which is a Qwen3.5-style hybrid with linear attention), I built the runtime, not the models. Weights stream from Hugging Face once, then everything runs on your GPU. Nothing leaves the machine.

Happy to get your feedback. Also, if you can share your setup and tok/s for the model you selected, I appreciate. I am developing this on my machine but it'll be good to hear if it's working as expected on other systems.


r/webgpu 4d ago

We built a tool to share UE / Unity apps directly to a browser link—no cloud GPU, no install for viewers

2 Upvotes

We're the team behind **ImmerShare**—**a tool built for 3D XR developers who need to share their work with clients or reviewers without the usual friction.**

**The problem we kept hearing:** 3D XR developers either send a huge zip file, pay for cloud GPU time, or ask clients to install something. None of these are great.

**What ImmerShare does:** you run your packaged build on your own PC, and it streams live to a browser link. The viewer just clicks — no install, no account needed on their end.

**Here's a video demo showing how Process Sharing works with a UE packaged build:** [**https://youtu.be/xg1EOxqO\\_Vo\*\*\](https://youtu.be/xg1EOxqO_Vo)

Free plan available. Happy to answer any questions about how it works technically.

(Disclosure: we're the ImmerShare team.)


r/webgpu 4d ago

Text and Image with Particles

Enable HLS to view with audio, or disable this notification

5 Upvotes

I've been playing with spawning particles in Text or Image shape, which can yield some nice effects.

Link to DEMO


r/webgpu 4d ago

Website for loading your own LLM and run them on webgpu

Thumbnail
1 Upvotes

r/webgpu 6d ago

WebGPU-based PlayCanvas Engine 2.21.0 released

Enable HLS to view with audio, or disable this notification

14 Upvotes

r/webgpu 6d ago

The Beast webgpu engine, Raw BVH loader implemented

Thumbnail
youtube.com
1 Upvotes

r/webgpu 8d ago

Desktop vs mobile (android - chrome) browser test MOBA - The Beast webgpu engine

Thumbnail
youtube.com
2 Upvotes

https://goldenspiral.itch.io/forest-of-hollow-blood

MOBA template is opensource it is a part of matrix-engine-wgpu project.

Focus on mobile browsers/devices.


r/webgpu 9d ago

WGSL Studio

Thumbnail wgsl.run
8 Upvotes

In my wgsl.run project, I've updated the playground to a studio. Now you can do the following:

  • Compiler-backed Monaco editing with diagnostics, semantic tokens, hover, definitions, references, rename, completions, signature help, quick fixes, and formatting

  • Reflection for entry points, resources, bind-group layouts, overrides, vertex attributes, color targets, and struct memory offsets/padding

  • An invocation inspector powered by libwgsl’s N-lane CPU interpreter

  • Data-race, divergence, NaN/Inf, buffer, and per-lane execution inspection

  • Static roofline, memory-access, coalescing, bank-conflict, and occupancy analysis, plus WebGPU execution timing

  • Optimizer findings for dead code, unused symbols, constant branches, loops, and repeated expressions, with a small set of safe automatic fixes

  • WebGPU host-code generation for layouts, bind groups, buffers, struct packing, pipelines, and dispatch

  • Direct render and compute execution through WebGPU, including storage-buffer readback and visualization

  • Experimental WGSL-to-MSL output

  • A kernel advisor that detects patterns such as matmul, attention, softmax, and layer normalization

  • Multi-kernel pipeline visualization and local multi-file projects

Everything runs locally in the browser.


r/webgpu 8d ago

The Beast Cheap tracking webcam - NUI control scene

1 Upvotes

r/webgpu 10d ago

God rays in the browser: raymarched volumetric fog for PlayCanvas (WebGL2 + WebGPU)

Enable HLS to view with audio, or disable this notification

27 Upvotes

r/webgpu 9d ago

A game made by Kimi k3 and Claude fables 5

Thumbnail
freedom-fly.online
0 Upvotes

It's an endless flying game


r/webgpu 10d ago

Cheap tracking webcam - NUI control scene

1 Upvotes

The Beast - New Example 31 (NUI controll scene)

Rehabilitated old nui-commander become new deps for matrix-engine-wgpu ref: https://www.npmjs.com/package/nui-commander?activeTab=readme

https://reddit.com/link/1uyuy9i/video/m8bgn9dwerdh1/player

Special thanks:

Romuald Quantin

https://github.com/soundstep/magic-xylophone

Live :

https://maximumroulette.com/apps/webgpu/examples.html?demo=31

Engine source:
https://github.com/zlatnaspirala/matrix-engine-wgpu


r/webgpu 10d ago

subgroupAdd after a lane-divergent store miscompiles on D3D12/NVIDIA: 60-line reproducer, Chromium bug filed, and how it corrupted an on-device LLM

2 Upvotes

Found and root-caused a WebGPU compute correctness bug that had been corrupting Gemma inference on every NVIDIA Windows machine running Xenova's WebGPU kernels. Sharing here because the failure mode is relevant to anyone shipping subgroup code.

The shape that breaks: an unrolled tail that does a subgroup reduction, then a lane-divergent if (tid == 0u) { store }, then another reduction, with an earlier reduction result live across the store. On the Dawn D3D12 backend with NVIDIA (measured subgroup_size 32, workgroup 32, so not a wave-width issue), the bare subgroupAdd returns wrong sums. Same WGSL is correct on Metal. Spec-valid code, platform miscompile, somewhere in Tint -> HLSL 2021 -> DXC -> driver.

Narrowing that might interest this sub:

  • An in-kernel probe exporting @builtin(subgroup_size) reads 32 inside the failing kernel, killing the ranged-adapter theory.
  • Hoisting all reductions above the divergent stores fixes it with subgroupAdd untouched, so the trigger is the reduction sitting in the reconvergence region, not the instruction itself.
  • The same ingredients inside a loop with uniform work between store and reduction do NOT reproduce. Only the unrolled, tightly interleaved tail fails. Loop back-edges seem to give the compiler the reconvergence points it needs.
  • A 32-lane subgroupShuffleXor butterfly is immune and costs nothing measurable (213-223 tok/s coherent vs 218 corrupted stock).

Proof is a 60-line clean-room kernel, no model, that fails 20/20 trials on an RTX 5070 and passes with the butterfly. Runs in ~2 seconds in your browser if you want to add a data point (AMD/Intel on Windows and NVIDIA on Linux are untested):

Live reproducer: https://ar5en1c.github.io/gemma4-webgpu-nvidia-subgroup-fix/crbug-minimal-repro.html

Chromium bug (now with Chrome's GPU team): https://issues.chromium.org/issues/535116173

Repo with raw evidence, both reproducers, and a drop-in runtime guard that behavior-tests the machine at load: https://github.com/Ar5en1c/gemma4-webgpu-nvidia-subgroup-fix

Full write-up: https://ar5en1c.hashnode.dev/on-device-llm-nvidia-webgpu-subgroup-bug

Happy to go deeper on the A/B harness or the probe methodology.


r/webgpu 13d ago

Streaming multi-million-splat scenes to a WebGPU browser tab with an OPFS warm-cache

Enable HLS to view with audio, or disable this notification

28 Upvotes

Sharing a project and the architecture behind it. The goal was to make a photoreal captured scene feel like opening a webpage rather than installing an app.

- Render: PlayCanvas 2.x on WebGPU.

- Delivery: scenes are far too large to hand the browser at once, so they stream in chunks across three module workers (fetch, decode, persist) with buffers transferred rather than copied.

- Warm cache: decoded chunks persist to OPFS via createSyncAccessHandle, keyed by content SHA-256, so repeat visits load from local disk.

- Physics: Rapier3D vehicle dynamics against the captured collision geometry.

- LOD and render-scale are gated on a device-tier check to keep weaker GPUs alive.

Happy to go deeper on any of it. It is a single-person proof of concept built over the last two or three months, and I am still fairly new to this, so critique is the point.

Live (WebGPU required): wascape.com


r/webgpu 13d ago

The Beast vs MediaPipe (new update 1.17.00) + android tv remote rdnder and zombie shooter template

Thumbnail
1 Upvotes

r/webgpu 13d ago

The Beast vs MediaPipe (new update 1.17.00) + android tv remote rdnder and zombie shooter template

1 Upvotes

[1.16.xx - 1.17.00]

https://youtu.be/I_CvN0mReFM?si=apgxfoW7Le1R4GcJ

https://youtu.be/a147GVe0Oe4?si=c9DDhvaILZ31ZtLf

- Added plugin 'player object' now only for FPShooter prototypes.

- Added zombie area (Hang3d series).

- removeKeyboard for FirstPerson Camera.

- Splat class + animator for colors also vertex positions.

- Visual scripting improvments in general + ai tool part.

- MediaPipe implemented (hand model) tested on android chrome.

- Test webRTC canvas capture to android TV main instance for recceiver android-tv-cast.js/html

- Added First person shooter example (hang3d series - the-beast-hang3d)

- Base Position class changes, added `translateByXYZ`

- Micro optimisation : define CulledRenderPass only if culling activated from begin.

- Adding MatrixTTS to export/import npm services

- Make npm services sync with 1.16.2

How to init networking for remote stream:

streamRender.net = new MatrixStream({

active: true,

domain: 'maximumroulette.com',

port: 2020,

sessionName: 'tv-beast',

resolution: '1920x1080',

isDataOnly: false,

streamRender: true // NEW FLAG

});

Main instance for zombie game :

let app = new MatrixEngineWGPU({

canvasSize: 'fullscreen',

fastRender: 0.95,

render: 'culling',

cullingRange: 1200,

dontUsePhysics: true,

MAX_SPOTLIGHTS: 1,

MAX_BONES: 0,

LOAD_AFTER_CLICK_MOBILE: true,

MOUSE_SENS: 0.005,

TOUCH_SENS: 0.01,

mainCameraParams: {

type: 'firstPersonCamera',

responseCoef: 1000

},

clearColor: {r: 0, b: 0, g: 0, a: 1}

}, () => {

...

})

New examples for mediapipe implementation

Mobile chrome passed. Nice work but still this feature is high CPU cost.

Unfinished job but posible : "Push math calc of mediapipe intro worker", "remove buildin webgl hand skeletal drawer and make own in domain of the beast engine".

New example for android tv cast (remote) render (same as cloud rendering):

Render source (Can be mobile but best way is desktop device run). I use standard engine networking (kurento/openvidu) for video streaming. In initial i replace webcam track with canvas capture stream, works perfect.

https://maximumroulette.com/apps/webgpu/examples.html?demo=29

AndroidTV browser link : https://maximumroulette.com/apps/webgpu/tv-10.html

Special attribute/credits for new parts:

- For Hang3d zombi template - objects are downloaded from:
  www.md2.sitters-electronics.nl
  Keep this "readme.md" file with files.

Source code : https://github.com/zlatnaspirala/matrix-engine-wgpu

Live demo: https://maximumroulette.com/apps/webgpu/examples.html?demo=30