Light bloom is done with multipass blurring. First the image is downsampled 5 times and blurred into a new image half as big using a 6x6 filter. Then each downsampled image is blurred again and added back to its parent
using a 3x3 filter. Finally, the half-size image is blurred and mixed with the original image.

It's cheap! About 80 texture read operations per pixel total.

(See alt. text for video explanation. Or see https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom .)

🧡 14/N

#BubbleUniverse

Here's the isolated bloom. The checkerboard is easier to see here.

🧡 13/N

#BubbleUniverse

I've been working on a light bloom filter for the bubble universe. There's this weird checkerboard pattern in the glow - most visible in the southeast corner where the arrow is.

I finally figured it out. That is, I'm pretty sure, caused by floating point overflow. I'm using f16 because wgpu on my GPU doesn't support blending into an f32 buffer.

Anyway. Light bloom. I'll probably turn it down once it's debugged.

🧡 12/N

#BubbleUniverse

I don't think I pushed that effect far enough. MPEG compression adds a lot of grit, so here's a still for comparison.

Meanwhile, I've been working on light bloom. That's the next scheduled effect. This dandelion thing wasn't scheduled, though, and neither were 🧡 9 or 🧡 8.

🧡 11/N

#BubbleUniverse

The Bubble Universe tool now can directly record to video, and it's got HDR with tone mapping.

I promised visual effects... Here's one where I made the particles fuzzier at the edges. (I also removed 80% of the particles and enabled HDR/tone mapping.)

🧡 10/N

#BubbleUniverse

The problem with programming eye candy tools is that it's easy to get distracted into making pretty pictures and stop working on the tool.

Anyway, here's an interesting spot I found in the universe of bubble universes. If you look at Yuruyurau's original code, there's a parameter, R = Ο„/200. In this image, I vary R between 0.49 and 0.51.

🧡 9/N

#BubbleUniverse

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

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

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

GitHub - kbob/bubble-universe: The infamous Bubble Universe graphics hack, using WebGPU

The infamous Bubble Universe graphics hack, using WebGPU - kbob/bubble-universe

GitHub
If bubbles define structure, then thresholds define birth.
Not a single Big Bang, but countless local conditions crossing a limit.
Maybe the universe doesn’t explode into existence β€”
maybe it emerges where balance breaks. 🌌
#Cosmology #BubbleUniverse #BeyondBigBang #ThresholdPhysics