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
Holographic Card
Holographic Card

A minimal graphite card with Geist typography and an equilateral triangle outline. Approach to reveal wavy foil engravings and a triangular fractal, with sweeping pearlescent light and fine diffraction detail.

  • holographic
  • iridescence
  • card
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
Atmosphere & Clouds
Atmosphere & Clouds

A physically based sky and volumetric clouds — Hillaire 2020 transmittance, multiple-scattering, sky-view and aerial-perspective lookup tables built with compute and storage textures, ozone, a limb-darkened sun, and Nubis-style clouds raymarched through tileable 3D Perlin-Worley noise and lit by the same tables, from sea level up to the stratosphere.

  • volumetric
  • compute
  • raymarching
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
Matcap Shading
Matcap Shading

A lighting rig baked once into a sphere-shaped lookup texture, then replayed as a single texture fetch per pixel on a spinning relief-mapped sphere.

  • matcap
  • lighting
  • shader
Video to Texture
Video to Texture

Drive a texture from a playing video with requestVideoFrameCallback, so a copy into the GPU happens once per decoded frame while the cube keeps spinning at the display refresh rate.

  • video
  • animation
  • 3d
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
Three.js WGSL modules
Three.js WGSL modules

Turn one exported WGSL function into a callable Three.js TSL node and use it on a physical material.

  • three
  • 3d
  • shader
Lava material
Lava material

Author a procedural lava material as plain WGSL modules and wire them into a three.js node material — twelve surface slots, all driven from shader source.

  • three
  • 3d
  • shader
Particle Orbit
Particle Orbit

A shared-device vgpu + TypeGPU experiment: TypeGPU advances light-seeking dust through a radiance field rendered by vgpu, then vgpu draws the same particle buffer zero-copy alongside orbiting lights, HDR bloom, and a CRT finish.

  • typegpu
  • instancing
  • particles
TypeGPU Liquid Glass
TypeGPU Liquid Glass

A refractive TypeGPU logo made with TypeScript GPU functions, translated into WGSL and rendered with vgpu.

  • typegpu
  • shader
  • frosted-glass
Adaptive Quality
Adaptive Quality

Start on a High pipeline and downgrade once to a cheaper Low pipeline when the GPU tier, battery level, or presented FPS say so. The tier swap is prepared off-screen and every signal is advisory.

  • performance
  • adaptive-quality
  • bloom
Glass Sculpture
Glass Sculpture

A raymarched glass sculpture under a studio light rig, with refraction, total internal reflection, chromatic dispersion, absorption, bloom, and interactive lighting.

  • raymarching
  • lighting
  • hdr
Spiral Galaxy
Spiral Galaxy

A launch-page star-field hero built end to end on vgpu: a compute pass flows 4,600 stars along the five spiral strokes of a "6", converges them from a scattered sky and runs a pointer-repel simulation; additive quads draw them into an HDR scene; a bloom, lens-flare and dirty-glass chain finishes with an ambient glow, vignette and ACES tone mapping. Drag to rotate, hover to scatter.

  • particles
  • compute
  • simulation
Liquid Layout
Liquid Layout

Drag to reorder, shuffle and filter eight DOM cards with Motion while vgpu renders them as refracting glass that merges wherever cards meet.

  • motion
  • liquid
  • refraction
Spring Choreography
Spring Choreography

Half a million GPU particles morph between shapes, each on a real Motion spring and stagger, sequenced by a scrubbable Motion timeline.

  • motion
  • particles
  • spring
Modular City
Modular City

A miniature city whose neighborhoods are vgpu/scene groups of instance records; tap a building to pick it with a GPU ID pass, then edit it.

  • 3d
  • scene-graph
  • instancing
Kinetic Sculpture
Kinetic Sculpture

A balanced brass mobile sways over a studio plinth: nested vgpu/scene nodes drive bound instances, drawn by four instanced, shadow-mapped WGSL draws.

  • 3d
  • scene-graph
  • shadows
Marble Machine
Marble Machine

Glossy striped marbles roll down maple ramps and pile into a felt tray; cannon-es runs the physics and vgpu/scene instances draw every body.

  • 3d
  • cannon
  • physics
Mechanical Garden
Mechanical Garden

Quadruped robot dogs trot across a gray training ground you can elevate and lower: math solves their legs with FABRIK, vgpu/scene instances every part.

  • 3d
  • robotics
  • inverse-kinematics