Skip to main content

luma.gl

Examples

Explore interactive examples for rendering, GPU compute, data processing, and visualization.

Find examples

Search by name, topic, graphics API, or difficulty.

54 examples

Showing 54 of 54 examples

Featured examples

Showcase

05

Core capabilities

API

10
WebGPUWebGL2
API

Animation

Drive a portable render loop with frame timing, animated uniforms, and continuous model updates.

WebGPUWebGL2
API

Blending

Compare GPU blend equations and source/destination factors on overlapping transparent geometry.

WebGPUWebGL2
API

Multi Canvas

Render two independently resized canvases through presentation contexts backed by one shared GPU device.

WebGPUWebGL2
API

Texture Cube

Sample a cube texture across six faces to render direction-dependent environment imagery.

WebGPUWebGL2
API

Texture 3D

Upload and sample volumetric texture slices inside a continuously animated three-dimensional field.

WebGPUWebGL2
API

Texture Sampling

Compare independent texture samplers across a draggable divider, inspecting filtering, mipmaps, addressing, anisotropy, and depth comparisons.

WebGPUWebGL2
API

Texture Tester

Probe which compressed texture families the current browser and GPU can decode and render.

WebGPUWebGL2
API

Texture Video

Stream live video frames into a dynamic GPU texture and sample them while rendering.

WebGPU
API

Render Bundles

Record repeated WebGPU draw commands once, then replay the bundle efficiently on every frame.

WebGPUWebGL2
API

Antialiasing Techniques

Compare single-sample rendering, FXAA, supersampling, and texture filtering in a split view.

Core capabilities

GPGPU

01

Image, lighting, and post-processing

Effects

10
WebGPUWebGL2
Effects

Effects: Depth of Field

Focus a layered 3D scene with a reusable depth-aware bokeh and depth-of-field pipeline.

WebGPUWebGL2
Effects

Effects: Persistence

Accumulate animated electron trails across framebuffer history with a tunable persistence effect.

WebGPUWebGL2
Effects

Effects: Image Processing

Compose, reorder, and live-tune a complete image-effect library against an animated procedural scene.

WebGPUWebGL2HDR
Effects

Effects: Bloom

Explore HDR bloom with spectral lens ghosts, diffraction starbursts, halos, temporal stability, and textured lens dirt.

WebGPU
Effects

Effects: Visualization City

Inspect a procedural city through cascaded and local shadows, SSAO, SSR, fog, outlines, TAA, and motion blur.

WebGPUHDR
Effects

Deferred Rendering: Illumination Lab

Resolve hundreds of clustered lights through deferred PBR, GTAO, SSGI, SSR, volumetrics, adaptive exposure, and HDR bloom.

WebGPU
Effects

Effects: Shadow Map Quality

Compare fitted cascades, PCSS penumbrae, bias, resolution, and debug views across shadow-quality presets.

WebGPUHDR
Effects

Spectral Caustics: Prism Cathedral

Trace a faceted refractor into a six-band, geometry-derived HDR caustic on WebGPU.

WebGPUHDR
Effects

Volumetric Fire Forge

Simulate reactive obstacle-aware fire and render the live volume with depth-correct HDR emission and smoke on WebGPU.

WebGPUWebGL2
Effects

Order-independent Transparency

Compare exact per-pixel A-buffer transparency, weighted blended OIT, and ordinary alpha blending.

Learn by building

Tutorials

13
WebGPUWebGL2
Tutorials

Hello Triangle

Draw a first portable triangle with a Model and backend-specific shaders.

WebGPUWebGL2
Tutorials

Triangle Geometry

Build a triangle from a Geometry object and render it through the portable Model API.

WebGPUWebGL2
Tutorials

Hello Cube

Render textured geometry with uniforms, depth testing, and animation.

WebGPUWebGL2
Tutorials

Hello Lighting

Add normals, material response, and ambient and directional lights to a rotating mesh.

WebGPUWebGL2
Tutorials

Hello glTF

Load a glTF asset and render its meshes, materials, textures, and scene transforms.

WebGPUWebGL2
Tutorials

Two Cubes

Draw two independently transformed cubes from shared geometry, shaders, and texture resources.

WebGPUWebGL2
Tutorials

Instanced Cubes

Animate many cubes with per-instance offsets and colors while sharing one geometry and draw call.

WebGPUWebGL2
Tutorials

Hello Instancing

Draw multiple objects efficiently with per-instance attributes.

WebGPUWebGL2
Tutorials

Shader Modules

Compose reusable shader modules, uniforms, and helper functions into a portable model.

WebGPUWebGL2
Tutorials

Shader Hooks

Inject custom shader logic at declared hook points without replacing the surrounding shader pipeline.

WebGPUWebGL2
Tutorials

Shader Plugins

Extend model shaders with typed plugins that contribute code, bindings, and runtime properties.

WebGL2
Tutorials

Transform Feedback

Update particle-like vertex data entirely on WebGL2 with transform feedback and buffer swapping.

WebGL2
Tutorials

Transform

Run a GPU data transform and capture its computed output for reuse in later rendering work.

Works with your stack

Integrations

02

Next-generation graphics

WebGPU

04

Emerging techniques

Experimental

05

Interactive simulations and GPU-native data

Simulation and data

04