Examples
Fullscreen shaders, compute pipelines, raw WebGPU interop, and read-only source files compiled directly by this docs app.

Map screen coordinates to color with a tiny fullscreen fragment shader.
- gradient
- shader

Analytic edge-glow triangle with LED emitters, floor radiance, and interactive color deploy. Canvas-scoped pointer input drives the lighting while a lil-gui selector chooses highlighted edges.
- triangle
- led
- raycasting

One high-contrast scene through Off, MSAA 4×, SSAA 2×, and FXAA — pick a mode and watch the edges.
- anti-aliasing
- msaa
- ssaa

Raymarched gravitational lensing — null geodesics bend starlight around an event horizon while a Keplerian accretion disk glows with Doppler beaming, graded through an HDR bloom chain.
- black-hole
- raymarching
- hdr

A multi-pass black hole that bakes relativistic ray traversal once into a G-buffer, then reuses it for animated disk shading, stars, antialiasing and HDR bloom.
- black-hole
- raymarching
- performance

A procedural planet with GPU-baked albedo, night lights and clouds, a lit atmosphere, and an HDR bloom chain tuned so only the sun glows.
- lighting
- hdr
- bloom

A compact pressure-projected fluid solver with velocity advection, colorful dye, and pointer or touch stirring.
- fluid
- simulation
- compute

One cube mesh + one instance stream, with 125,000 independently animated cubes.
- instancing
- indirect-rendering
- performance

Four primitive ranges in one mesh, recorded once as a render bundle.
- batch-rendering
- render-bundles
- instancing

A deep-water surface driven by a real inverse FFT. A Phillips spectrum evolves in frequency space, Stockham passes produce a displacement field, and half a million particles ride the waves through an HDR bloom chain.
- ocean
- fft
- particles

A displaced ocean surface driven by a real inverse FFT. A Phillips spectrum evolves in frequency space, two compute passes run a shared-memory radix-2 IFFT into a displacement field, and a procedural grid rides it with per-pixel normals, foam and a Fresnel sky reflection under a tunable sunset. Orbit with the mouse; tweak the sea from the panel.
- ocean
- fft
- compute

A raymarched Sierpiński tetrahedron emerges from pure black under directional light and restrained HDR bloom, with drag-only orbit controls.
- raymarching
- raymarch
- fractal

A beveled glass tetrahedron contains a morphing fractal mesh and liquid orb, combining screen-space transmission, studio reflections, soft material lighting and interactive controls.
- fractal
- frosted-glass
- lighting

One 360° equirectangular map lights the whole scene: it is the background and every reflection on a mirror-metal cube floating in it.
- lighting
- hdr
- rendering

A glass cube refracts the scene behind it in screen space: the frame is rendered, blurred into a pyramid, and read back through Snell refraction, chromatic dispersion and a Fresnel-weighted environment reflection.
- lighting
- hdr
- rendering

A single signed-distance test slices an animated icosphere, while a fitted disk reveals the moving cross-section.
- clipping
- 3d
- shader

Draw light with the pointer and watch it bounce: a jump-flooded distance field feeds six radiance cascades — base 4, geometric intervals, linear RGBA16F — merged top-down with visibility alpha into 2D global illumination.
- lighting
- hdr
- raymarching

The static ten-dot Agent mark becomes a selectable loading field with capture-quality controls: every gray-to-white dot is both an HDR emitter and an occluder, feeding a jump-flooded distance field and six top-down radiance cascades.
- lighting
- hdr
- raymarching

Next.js logo shader — a rim-lit N glyph with volumetric scattering: a 48-step ray walk jittered by blue noise over a separable Gaussian blur chain, breathing autonomously until the pointer takes over.
- flare
- volumetric
- lighting

Estimate depth from a photo or webcam with ONNX Runtime Web on WebGPU. Shade its GPU-resident output beside the input through a zero-copy vgpu buffer wrap.
- machine-learning
- onnx
- depth-estimation

Draw a digit and classify it with ONNX Runtime Web on WebGPU. Render the GPU-resident logits through a non-owning vgpu buffer wrap.
- machine-learning
- onnx
- mnist

Wipe fog off the glass with your hands. ONNX Runtime Web tracks both palms on WebGPU to clear a frosted camera feed.
- machine-learning
- onnx
- hand-tracking