Examples

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

Simple Gradient
Simple Gradient

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

  • gradient
  • shader
Triangle LED Hero
Triangle LED Hero

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
Anti-Aliasing
Anti-Aliasing

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

  • anti-aliasing
  • msaa
  • ssaa
Black Hole
Black Hole

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
Optimized Black Hole
Optimized Black Hole

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
Earth
Earth

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
Interactive Fluid
Interactive Fluid

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

  • fluid
  • simulation
  • compute
Instanced Rendering
Instanced Rendering

One cube mesh + one instance stream, with 125,000 independently animated cubes.

  • instancing
  • indirect-rendering
  • performance
Batch Rendering
Batch Rendering

Four primitive ranges in one mesh, recorded once as a render bundle.

  • batch-rendering
  • render-bundles
  • instancing
Particles ocean
Particles ocean

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
FFT ocean surface
FFT ocean surface

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
Raymarched fractal
Raymarched fractal

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

  • raymarching
  • raymarch
  • fractal
Glass Fractal
Glass 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
Environment Map
Environment Map

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
Transmission
Transmission

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
Clipping
Clipping

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

  • clipping
  • 3d
  • shader
Radiance Cascades
Radiance Cascades

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
Agent Radiance Cascades
Agent Radiance Cascades

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 Flare
Next.js Flare

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
Depth Estimation
Depth Estimation

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
MNIST Classifier
MNIST Classifier

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
Air Painting
Air Painting

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