Introducing a new way to review your PRs.

Read the announcement

visgl / luma.gl

High-performance Toolkit for WebGL-based Data Visualization

View on GitHub

30 documents · Updated Nov 20, 2026

docs / deck-integration

deck.gl integration

The deck.gl integration connects luma.gl GPU data, rendering layers, and visual effects to deck.gl's layer and frame model. It gives applications two main paths: direct GPU-backed layers for data that is already on the GPU, and Arrow-backed layers that turn columnar table data into GPU inputs before rendering. For package-level layer choices, see deck.gl GPU and Arrow layers; for wider data and device context, see data and visualization assets and rendering runtime platforms.

Integration model

deck.gl remains responsible for views, layer state, picking, effects, and frame scheduling. The luma.gl packages supply GPU-aware layers and effects that fit into those deck.gl extension points.

flowchart LR
  A[Application data] --> B{Input path}
  B -->|GPU data| C[GPU-backed deck.gl layers]
  B -->|Arrow table or stream| D[Arrow-backed deck.gl layers]
  C --> E[deck.gl layer lifecycle]
  D --> E
  E --> F[luma.gl GPU rendering]
  F --> G[Deck view, picking, and display]
  H[Scene and shader effects] --> E

Layer and effect boundary

The integration uses normal deck.gl layers for geometry and normal deck.gl effects for frame-wide work. This lets GPU rendering share deck.gl features such as coordinate systems, visibility, transitions, picking, and view management instead of creating a separate render loop.

References: modules/…/index.ts• L5-83 modules/…/index.ts• L5-75

GPU data boundary

A GPUVector is a GPU-resident, column-like value with a known format and row layout. Direct GPU layers borrow these inputs, so the application keeps ownership of source data while the layer manages only the render resources that it creates.

References: modules/…/README.md• L44-70 modules/…/gpu-scatterplot-layer.ts• L30-40 modules/…/gpu-vector-layer-utils.ts• L12-58

GPU-backed workflows

@deck.gl-community/gpu-layers is the direct path for applications that already produce GPU data or need GPU-rendered visual features. Its GPUVector and geographic query paths require WebGPU, while selected environmental and material layers also support WebGL2. Its reusable layer family covers fixed-width points and shapes such as scatterplots, arcs, lines, columns, grid cells, icons, and point clouds. It also covers variable paths and filled or stroked polygons; other layers add text, scene, sky, water, weather, atmosphere, and particle visuals.

GPUVector layer family

The GPUVector layers form a shared rendering core below data adapters. They preserve aligned batches and row identity while avoiding a JavaScript object for each row. The family includes points, scatterplots, straight and curved lines, variable paths, grid cells, extruded columns, point clouds, icons, text, and polygon fill or stroke paths. Optional style columns remain GPU-resident, and picking maps displayed rows back to their source vector and batch.

This makes the same rendering boundary available to Arrow adapters and to applications whose data is already in GPU vectors. Composite forms reuse the same cores: a grid cell is a column specialization, while a filled-and-stroked polygon combines solid-polygon and path layers.

See GPU-backed layers for the layer groups and their main use cases.

References: modules/…/gpu-arc-layer.ts• L29-41 modules/…/gpu-column-layer.ts• L29-39 modules/…/gpu-grid-cell-layer.ts• L9-31 modules/…/gpu-icon-layer.ts• L29-42 modules/…/gpu-line-layer.ts• L29-38 modules/…/gpu-path-layer.ts• L24-34 modules/…/gpu-point-cloud-layer.ts• L29-35 modules/…/gpu-polygon-layer.ts• L10-28 modules/…/gpu-scatterplot-layer.ts• L30-38 modules/…/gpu-solid-polygon-layer.ts• L24-30 modules/…/gpu-vector-layer-utils.ts• L12-58

Scene and shader effects

The package also connects luma.gl scene capture, camera-motion reconstruction, and shader-pass graphs to deck.gl effects. A scene capture can expose color, depth, normals, selection, or motion data to later work; a velocity pass can derive screen motion from captured depth and the current-to-previous camera transform; a shader-pass effect can then process a chosen GPU image and present the result through deck.gl's post-processing chain.

The capture and processing stages form one optional path:

flowchart LR
  A[Deck layers] --> B[SceneBufferEffect]
  B --> C[Scene textures]
  C --> D[SceneVelocityModel or shader pass]
  D --> E[Deck display]

These effects do not replace ordinary deck.gl picking. Scene capture and motion reconstruction are opt-in WebGPU paths, and downstream effects must explicitly choose which captured resources they use.

References: modules/…/scene-velocity-model.ts• L29-67 modules/…/scene-buffer-effect.ts• L25-50 modules/…/shader-pass-effect.ts• L21-31

Specialized visual layers

Specialized layers use the same deck.gl boundary for visuals that are not ordinary table rows. They cover GPU simulation output, local-meter surfaces, weather, atmosphere, sky and celestial content, clouds, glow points, sketch edges, water, bitmaps, and other scene elements. The application supplies clocks, textures, buffers, or scene settings while deck.gl controls when those layers draw.

The flow and wind particle paths add GPU simulation-driven visual layers. FlowParticleLayer reads current and prior particle textures, while WindParticleLayer reads current and prior scientific-flow buffers. Both draw short screen-width streaks with depth testing and stable particle picking. They display motion for a configured time window; they do not advance or destroy the simulation and do not retain a curved trail.

These layers are best viewed as WebGPU visual components, except where a shared material layer states broader backend support. They do not provide a general data store, a terrain engine, or a replacement for deck.gl's normal layer composition.

References: modules/…/atmosphere-layer.ts• L11-18 modules/…/cloud-layer.ts• L12-18 modules/…/flow-particle-layer-shaders.ts• L7-17 modules/…/flow-particle-layer.ts• L19-32 modules/…/globe-cloud-layer.ts• L17-20 modules/…/glow-point-layer.ts• L25-37 modules/…/gpu-bitmap-layer.ts• L18-27 modules/…/sketch-edge-layer.ts• L19-24 modules/…/sky-body-layer.ts• L21-31 modules/…/sky-layer.ts• L27-118 modules/…/sky-view.ts• L10-70 modules/…/starfield-layer.ts• L13-20 modules/…/surface-buffer.ts• L8-40 modules/…/water-surface-layer.ts• L24-40 modules/…/weather-particle-layer-shaders.ts• L5-40 modules/…/weather-particle-layer.ts• L30-42 modules/…/wind-particle-layer-shaders.ts• L7-17 modules/…/wind-particle-layer.ts• L19-28

Geographic point queries

The GPU package can keep a resident geographic point set and expose two query views through deck.gl: points inside the current viewport and points inside a local geographic radius. It projects and indexes the data once, then updates query inputs as the viewport or selection changes so result counts and point IDs stay GPU-driven.

The GPUSpatialGeographicPointQueryEffect supplies draw-ready outputs for a GPUSpatialPointLayer and participates in Deck picking. Optional counters and graph timing reports provide delayed diagnostics without blocking the render path. The effect requires WebGPU and clears both query outputs when no usable viewport is available.

References: modules/…/gpu-spatial-geographic-point-query-effect.ts• L94-145 modules/…/gpu-spatial-geographic-point-query-effect.ts• L416-536 modules/…/gpu-spatial-geographic-point-query-effect.ts• L601-801

Arrow-backed workflows

@deck.gl-community/arrow-layers is the table-data path for applications that use Apache Arrow. Apache Arrow is a columnar data format; these layers select Arrow columns, validate and prepare GPU vectors, and delegate rendering to the GPU-backed layer family or to luma-native text, path, and polygon renderers.

Arrow layer adapters

Arrow adapters keep deck.gl-style accessor names while changing the input contract from JavaScript row data to Arrow columns, vectors, tables, record batches, or streams. The fixed-width adapters cover scatterplots, arcs, lines, columns, and point clouds. A semantic input can be a constant, an Arrow source, or a caller-owned GPU vector with an explicit null replacement where the adapter supports that form. The adapter validates formats and row counts at the boundary, owns GPU vectors that it creates, and releases them when the layer input changes or when the layer is finalized.

The icon adapter maps source names to atlas metadata before GPU rendering. The text adapter combines Arrow rows with prepared glyph data and atlas pages. Path, polygon, icon, and text adapters preserve source-batch information so deck.gl picking can report a global row, source batch, and row within that batch.

See Arrow-backed layers for the supported adapter families.

References: modules/…/arrow-gpu-layer-utils.ts• L10-39 modules/…/arrow-layer-input.ts• L16-78 modules/…/arrow-arc-layer.ts• L19-36 modules/…/arrow-column-layer.ts• L19-29 modules/…/arrow-icon-layer.ts• L30-65 modules/…/arrow-line-layer.ts• L19-29 modules/…/arrow-point-cloud-layer.ts• L19-28 modules/…/arrow-scatterplot-layer.ts• L21-30 modules/…/arrow-text-layer.ts• L356-388

Column and batch contracts

The Arrow path preserves record-batch boundaries so that row alignment and ownership stay clear across the conversion boundary. Simple materialized adapters accept a table or record batch and reject missing columns, null rows, or mismatched Arrow formats. Path, polygon, and text flows can use streams and can define a replacement for null style values before GPU preparation.

Caller-owned GPU vectors are borrowed rather than destroyed by an adapter. They must use an accepted format and match the expected rows. This contract keeps data preparation in the adapter and keeps Arrow types out of the GPU rendering layer. It also makes errors visible at the input boundary instead of producing unclear results during drawing.

References: modules/…/arrow-gpu-layer-utils.ts• L10-39 modules/…/arrow-layer-input.ts• L16-103 modules/…/arrow-layer-input.ts• L156-235 modules/…/arrow-arc-layer.ts• L162-180 modules/…/arrow-line-layer.ts• L115-126

Streamed path and trip workflows

ArrowPathLayer can append streamed record batches as they arrive while preserving global row offsets for deck.gl picking. Its path and style inputs can be constants, Arrow columns, or GPU vectors, and its temporal settings can filter a current measure and trail length. ArrowTripsLayer specializes this path for timestamped animation with a WebGPU storage model and fading trail behavior.

The path model can use an attribute route on supported backends or a storage route on WebGPU. The adapter keeps timestamps and style sources aligned with each batch instead of adding them to CPU coordinate arrays. It reports batch progress and can report load or preparation errors without allowing an old asynchronous load to replace a newer source.

References: modules/…/arrow-path-layer.ts• L468-497 modules/…/arrow-path-layer.ts• L535-589 modules/…/arrow-path-layer.ts• L635-887 modules/…/arrow-path-layer.ts• L893-1031 modules/…/arrow-trips-layer.ts• L9-32

Polygon and solid polygon workflows

ArrowPolygonLayer renders Arrow polygon columns through a luma-native renderer and keeps source-batch information for picking. Its color can be constant, an Arrow column, or a GPU vector for direct polygon data. Streamed polygon data uses a constant or Arrow color source instead of a direct GPU-vector color.

ArrowSolidPolygonLayer provides deck.gl SolidPolygon-style property names over the same Arrow polygon path. Tessellation and GPU buffers remain owned by the Arrow-native renderer.

References: modules/…/arrow-polygon-layer.ts• L48-58 modules/…/arrow-polygon-layer.ts• L199-220 modules/…/arrow-polygon-layer.ts• L345-445 modules/…/arrow-solid-polygon-layer.ts• L13-33

GPU graph workflows

The Arrow integration also connects WebGPU graph results to deck.gl. A graph dataset keeps vertex and edge relationships in GPU buffers while deck.gl renders nodes and edges and applies graph effects such as ranking, components, communities, degree, neighborhood search, and layout.

The graph effect preserves original source edge partitions, stable vertex IDs, and caller-owned initial positions. It progressively encodes topology and analysis before each frame encodes neighborhood search and layout work. Layout can use exact, spatial, or caller-contributed sampled work as graph size grows, while node and edge layers read the same resident state for styling, selection, highlighting, and picking.

This path adapts existing GPU graph work to deck.gl. It does not replace a graph data system or move graph data back to the CPU for ordinary rendering. Deck remains the owner of command submission.

References: modules/…/gpu-graph-edge-layer.ts• L15-22 modules/…/gpu-graph-edge-layer.ts• L94-155 modules/…/gpu-graph-node-layer.ts• L19-39 modules/…/gpu-graph-node-layer.ts• L202-278 modules/…/gpu-graph-effect.ts• L25-105 modules/…/gpu-graph-effect.ts• L149-196 modules/…/gpu-graph-effect.ts• L297-330 modules/…/gpu-graph-effect.ts• L372-401

Workflow choices

The input form and the desired output determine which integration path fits the application. The paths share deck.gl's frame model but differ in where data preparation and resource ownership sit.

NeedRecommended pathMain responsibility
Data already resides in GPU vectorsGPU-backed layersThe application prepares and owns the GPU data.
Data arrives as Arrow tables or record batchesArrow-backed layersThe adapter maps columns to GPU inputs and owns converted vectors.
A later pass needs scene color, depth, or derived effectsDeck effects from deck-gpu-layersThe effect captures or processes GPU images within Deck's frame.
GPU graph results need deck.gl display and pickingArrow package graph adaptersThe adapter exposes resident graph results as deck.gl layers and effects.
A scientific-flow simulation needs deck.gl displayWindParticleLayer or FlowParticleLayerThe application owns the simulation while the layer draws its current state.
Timestamped paths need animated trailsArrowTripsLayerThe adapter keeps timestamps and trail filtering in the GPU path.
Map or globe context needs sky, weather, or surface visualsSpecialized GPU layersThe application supplies scene inputs while Deck controls composition.

The detailed package page is the next reading step: deck.gl GPU and Arrow layers.

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the GPUVector layer input formats and the Arrow adapter output formats aligned. A change at one boundary can break all delegated layers.
  • Preserve the ownership rule when a layer starts borrowing a new buffer or when an adapter starts creating a converted vector.
  • Keep aligned physical chunks and global row offsets consistent when changing GPUVector batching. Picking and per-batch style bindings use the same mapping.
  • Keep deck.gl effect ordering clear when changing scene capture, velocity reconstruction, surface output, or shader-pass behavior. Capture consumers must run after the capture stage.
  • Keep picking row indices consistent with batch offsets when changing chunk handling or graph edge partitions.
  • Keep graph source partitions, stable vertex IDs, and progressive analysis stages aligned with the node and edge layers when changing graph visibility or layout behavior.
  • Keep geographic projection bounds and grid-index bounds in the same local coordinate frame when changing point-query inputs.
  • Keep viewport and selection query outputs paired with their matching draw records when changing geographic query result handling.
  • Keep current and previous flow or wind simulation buffers alive and unchanged in shape while particle layers draw them. Changes to particle count must stay consistent with the simulation state used for both current and prior positions.
  • Keep path batch row offsets aligned with source record batches when changing streamed path loading, style columns, or temporal filtering. Picking and GPU-vector style inputs use the same row mapping.
  • Keep icon names aligned with atlas entries and text rows aligned with prepared glyph data when changing Arrow icon or text inputs.
  • Keep polygon color source rules aligned with direct versus streamed data when changing Arrow polygon inputs.
  • Keep path and text model claims aligned with device support. Storage paths require WebGPU, while attribute paths support the non-storage route where stated.
  • Keep backend claims aligned with the package contract. The GPU layer, graph, particle, and storage polygon paths are WebGPU-only where stated.

Important failure modes

TriggerConsequenceGuard
Non-constant GPU vectors have different row counts or batch boundariesLayer attributes no longer describe the same rowsValidate aligned GPUVector inputs before constructing a GPU-backed layer.
A GPU vector has a format that the selected layer does not acceptThe layer cannot bind the input as its declared attributeUse the layer's declared vector format and validate it at the boundary.
Arrow columns contain null rows without a replacement valueConversion stops at the adapter boundarySupply an explicit null policy where supported or clean the source column first.
An application destroys a borrowed buffer or texture while Deck still uses itRendering or picking reads an invalid GPU resourceKeep caller-owned resources alive until the layer or effect is finalized.
A streamed polygon input is combined with a direct GPU-vector colorThe polygon color contract cannot resolve the sourceUse an Arrow or constant color for streamed data, or use direct polygon vectors without streamed data.
A path storage model is requested on a non-WebGPU deviceThe path layer cannot initialize its selected modelUse the attribute model or select a WebGPU device.
A path style GPU vector does not match the path rows for its batchColors or widths no longer describe the intended pathsKeep each style vector aligned with the path batch, or use an Arrow column or constant value.
An icon name has no atlas mappingThe Arrow icon adapter cannot prepare GPU icon metadataAdd an atlas entry for every source icon name.
A text storage model lacks the required GPU text expansion supportThe text adapter uses the attribute model instead of the requested storage pathAllow automatic model selection or use the supported attribute model.
A wind or flow simulation is used on an unsupported device or changes while the layer drawsThe particle layer cannot initialize or reads invalid paired stateSelect the required backend and keep current and prior simulation resources valid.
A scene effect is used on a non-WebGPU deviceScene capture or motion reconstruction cannot be createdUse ordinary Deck rendering on unsupported backends.
A shader-pass effect receives clipped ordinary color instead of an HDR captureLater passes cannot recover lost highlight rangeFeed the pass graph from a suitable floating-point scene capture when HDR output matters.
Sampled graph layout is selected without a caller-provided contributorThe graph effect cannot be constructedProvide the sampled layout work or select exact or spatial layout.
Geographic projected bounds do not cover the indexed pointsViewport and radius queries can miss valid pointsBuild the query index with bounds from the same projection as the point data.
No configured Deck viewport is usable for a geographic queryBoth query draw counts are clearedUse a live viewport or treat the outputs as empty until one is available.

Key files

FileWhy to read it
modules/…/package.jsonPackage boundary, public query export, and WebGPU capability statement for the direct GPU path.
modules/…/README.mdHigh-level scope, ownership rules, layer families, and effect boundaries for the direct GPU path.
modules/…/gpu-vector-layer-utils.tsShared batch, format, style-buffer, and picking contracts for GPUVector layers.
modules/…/gpu-scatterplot-layer.tsSmall example of the GPUVector layer contract and deck.gl lifecycle.
modules/…/gpu-arc-layer.tsCurved GPUVector layer and row-preserving batch draw boundary.
modules/…/gpu-column-layer.tsExtruded column rendering and per-row style inputs.
modules/…/gpu-grid-cell-layer.tsGrid-cell specialization over the column layer.
modules/…/gpu-line-layer.tsStraight GPUVector line rendering and picking.
modules/…/gpu-path-layer.tsGPU-only variable path rendering and temporal trail input.
modules/…/gpu-icon-layer.tsGPUVector icon data and atlas boundary.
modules/…/gpu-point-cloud-layer.tsPoint-cloud positions, normals, colors, and picking.
modules/…/gpu-polygon-layer.tsFilled-and-stroked polygon composition over GPU polygon and path layers.
modules/…/gpu-solid-polygon-layer.tsHost layer for caller-provided tessellated polygon vectors.
modules/…/flow-particle-layer.tsGPU particle textures, short motion streaks, and borrowed simulation state.
modules/…/wind-particle-layer.tsScientific-flow simulation-to-layer boundary, borrowed state contract, and particle picking.
modules/…/sky-layer.tsShared environmental time and observer model for map and globe views.
modules/…/water-surface-layer.tsSurface material, river variant, and auxiliary surface output boundary.
modules/…/scene-velocity-model.tsCamera-motion reconstruction from captured scene depth.
modules/…/gpu-spatial-point-layer.tsGPU-selected point display, indirect draw, staging, and picking limits.
modules/…/package.jsonPackage boundary and Arrow-to-GPU dependency relationship for the table-data path.
modules/…/README.mdHigh-level Arrow adapter model and GPU graph workflow.
modules/…/arrow-layer-input.tsShared Arrow, GPU-vector, null, and ownership contract.
modules/…/arrow-gpu-layer-utils.tsSynchronous Arrow-to-GPU-vector conversion and format checks.
modules/…/arrow-scatterplot-layer.tsMaterialized Arrow-to-GPU scatterplot adapter.
modules/…/arrow-arc-layer.tsMaterialized Arrow-to-GPU curved-arc adapter.
modules/…/arrow-column-layer.tsMaterialized Arrow-to-GPU extruded-column adapter.
modules/…/arrow-line-layer.tsMaterialized Arrow-to-GPU straight-line adapter.
modules/…/arrow-point-cloud-layer.tsMaterialized Arrow-to-GPU point-cloud adapter.
modules/…/arrow-icon-layer.tsArrow icon-name mapping and GPU atlas metadata preparation.
modules/…/arrow-path-layer.tsStreamed path batches, temporal trail display, style inputs, and path picking.
modules/…/arrow-polygon-layer.tsPolygon column, color-source, batch-picking, and backend boundary.
modules/…/arrow-solid-polygon-layer.tsSolidPolygon naming adapter over the Arrow polygon renderer.
modules/…/arrow-text-layer.tsArrow text, atlas, clipping, alignment, and source-row picking.
modules/…/arrow-trips-layer.tsTimestamped Arrow path specialization and animated trail defaults.
modules/…/gpu-graph-effect.tsResident graph analysis, progressive layout, stable partitions, and Deck frame ownership.
modules/…/gpu-graph-node-layer.tsGPU graph node display, analytic styles, and Deck picking.
modules/…/gpu-graph-edge-layer.tsGPU graph edge display and shared graph-state binding.
modules/…/gpu-spatial-geographic-point-query-effect.tsGeographic viewport and radius query outputs for GPU-backed point layers.