★ welcome, traveller! ★ the sky up there matches the time where you are ★newest post: Putting a WebGPU scene inside a blog post ★ click things, they make noises ★ psst… try clicking the night sky ★
gabinfor.github.io/blog/webgpu-in-a-post/

posted 3 Oct 2026

Putting a WebGPU scene inside a blog post

MDX lets me drop live 3D components right between paragraphs.

webgpugraphics

Posts ending in .mdx can import components. Here’s a live raymarched scene. Move your pointer over it:

Metaballs blended with a smooth-min SDF

It’s a single fragment shader in WGSL. For each pixel it marches a ray through a signed distance field: a function that returns how far any point is from the nearest surface. Smoothly blending a few spheres with smin gives the gooey look.

fn smin(a: f32, b: f32, k: f32) -> f32 {
  let h = clamp(0.5 + 0.5 * (b - a) / k, 0., 1.);
  return mix(b, a, h) - k * h * (1. - h);
}

If your browser doesn’t support WebGPU yet, you’ll see a soft gradient instead.


« back to all posts
status
your time
--:--
sky
…
weather
…
visits
1st
radio
Nightride FM: Chillsynth
off · chill synthwave
via nightride.fm