Elektrine lite

← Feed

@kbob@chaos.social

Post #1268832

2026-02-07 22:39 UTC

I wrote another one! I ported my Javascript + WebGPU implementation to Python + wgpu-py, and now I have a desktop app. And I pushed it to Github. "Share and enjoy!" https://github.com/kbob/bubble-universe 🧵 7/N #BubbleUniverse #Javascript #WebGPU #wgpu

Replies (2)

  • @kbob@chaos.social 2026-02-07 22:51

    If you want to browse the source, read the README and then look at the two shaders in the shaders/ directory. Those are the ones that implement the bubble universe algorithm; the other 1,000+ lines is just scaffolding to get data in and out of the GPU. EDIT: Do I need to mention that this code is rough as three day stubble? It will get cleaner, then messier, then cleaner... 🧵 8/N #BubbleUniverse #Javascript #WebGPU #wgpu

    Open ##1268833

  • @kbob@chaos.social 2026-02-11 03:21

    I finally got my head around WebGPU/wgpu enough to make my own render graph. Now the bubble universe thing is decomposed into a graph of render passes, and I've got some simple parameter animation going. In this screencap, I'm varying the particle size and transparency and varying the number of particles in two ways in sync with the universe's revolution. The color map is just doing its own thing; that wasn't planned. 🧵 8/N #BubbleUniverse #wgpu

    Open ##1268835