deck.gl GPU and Arrow layers
The deck-gpu-layers and deck-arrow-layers packages extend deck.gl with layers that keep column data and scene work close to the GPU. GPU layers accept prepared GPU data. Arrow layers adapt Arrow sources to those layers while keeping deck.gl views, effects, and picking as the scene contract.
Package roles
GPU rendering cores
The @deck.gl-community/gpu-layers package provides deck.gl layers for common marks, variable geometry, prepared polygons, text, textures, and graph-ready scene data. Its purpose is to render caller-owned GPU data without rebuilding JavaScript attributes for each feature.
The package also provides visual layers that are not table renderers. Water, weather, clouds, celestial bodies, glow points, sketch edges, flow particles, and scene motion effects add GPU-driven behavior to a deck.gl scene. Deck.gl manages the layer lifecycle and frame. luma.gl supplies the model, shader, texture, and buffer work used by each layer. The public entry point also exposes GPUSpatialPointLayer, which renders point rows selected by GPU query results.
References: modules/…/index.ts• L5-15 modules/…/index.ts• L21-39 modules/…/index.ts• L47-83 modules/…/gpu-arc-layer.ts• L29-41 modules/…/gpu-column-layer.ts• L29-39 modules/…/gpu-icon-layer.ts• L29-42 modules/…/gpu-line-layer.ts• L29-38 modules/…/gpu-point-cloud-layer.ts• L29-35 modules/…/gpu-scatterplot-layer.ts• L30-38
Arrow data adapters
The @deck.gl-community/arrow-layers package accepts materialized Arrow tables and record batches for fixed-width marks. Its path, polygon, and text layers also accept record-batch sources that can be consumed over time. Inputs can name a source column, provide an Arrow vector, borrow a compatible GPUVector, or use a constant value with an explicit replacement for null rows.
The adapters validate column shape, null state, format, and row count before they use GPU data. They create and own vectors converted from Arrow data. They borrow caller-owned GPU vectors. They preserve source batch and row identity so a deck.gl pick can map back to the input. Icon names are resolved through an application-provided atlas mapping.
References: modules/…/arrow-gpu-layer-utils.ts• L10-39 modules/…/arrow-layer-input.ts• L16-29 modules/…/arrow-layer-input.ts• L36-103 modules/…/arrow-icon-layer.ts• L30-65 modules/…/arrow-icon-layer.ts• L128-187 modules/…/arrow-layer-types.ts• L236-246
Layer capabilities
The packages divide responsibility by data ownership and input form. Together they cover common geometry, native column formats, time-based paths, graph views, and GPU-backed scene work.
| Layer group | Input or state | Main purpose |
|---|---|---|
| GPU vector layers | Caller-owned GPUVector columns | Render marks and geometry without CPU repacking |
| GPU texture and buffer layers | Caller-owned textures or packed buffers | Render bitmaps, glow points, sketch edges, particles, and selected points |
| Arrow fixed-width layers | Arrow tables, record batches, Arrow vectors, or GPU vectors | Turn columnar data into deck.gl point, line, arc, column, grid, icon, and point-cloud layers |
| Arrow path, polygon, and text layers | Arrow geometry, streams, or prepared GPU data | Render variable paths, polygons, and labels while retaining source-row identity |
| GPU polygon layers | Prepared tessellation and path vectors | Render filled and stroked polygons without object-list geometry |
| Trips and path layers | Paths with optional aligned time values | Show ordinary paths or a moving time window |
| Graph layers and effects | Resident positions, topology, and graph measures | Run graph analysis and layout in the deck.gl frame |
| Scene layers and effects | Textures, buffers, clocks, and view state | Add sky, water, weather, motion, and post-scene visual work |
Geometry layers
The geometry family covers points, straight lines, arcs, columns, grid cells, icons, paths, polygons, point clouds, and text. Fixed-width GPU vector layers consume aligned columns. Polygon and path layers use prepared variable-length geometry when one feature can contain many vertices.
Arrow adapters keep familiar deck.gl accessor names while changing the value source from JavaScript objects to Arrow columns or GPU vectors. The adapters select the required GPU format for each semantic input, while constants remain available for styles that do not vary by row.
Arrow path, polygon, and text rendering can consume record batches as they arrive. Their renderers keep batch offsets and source-row information so streamed data still supports deck.gl picking. Text uses a storage model when GPU text expansion is available and an attribute model when it is not.
The Arrow icon layer adds atlas metadata for each icon name. The GPU grid-cell layer specializes the GPU column core for square cells. The GPU polygon layer combines a solid fill core with an optional GPU path stroke. GPU arc, line, column, point-cloud, and scatterplot layers provide WebGPU-only fixed-width GPU vector marks with optional per-row style columns.
References: modules/…/arrow-arc-layer.ts• L19-36 modules/…/arrow-column-layer.ts• L19-29 modules/…/arrow-line-layer.ts• L19-29 modules/…/arrow-path-layer.ts• L468-497 modules/…/arrow-path-layer.ts• L635-741 modules/…/arrow-point-cloud-layer.ts• L19-28 modules/…/arrow-polygon-layer.ts• L199-216 modules/…/arrow-text-layer.ts• L356-380 modules/…/gpu-arc-layer.ts• L136-172 modules/…/gpu-column-layer.ts• L137-159 modules/…/gpu-icon-layer.ts• L69-102 modules/…/gpu-line-layer.ts• L100-125 modules/…/gpu-point-cloud-layer.ts• L102-117 modules/…/gpu-scatterplot-layer.ts• L106-122 modules/…/gpu-grid-cell-layer.ts• L9-32 modules/…/gpu-polygon-layer.ts• L10-65
Temporal layers
Temporal path rendering shows only the part of a path inside a current time window. ArrowPathLayer can use timestamps from its source or the fourth path coordinate. GPUPathLayer supports the same rule for GPU-resident paths, and the trip specialization exposes the same visual idea through an Arrow layer.
The temporal window is a render rule. It does not require the application to append time values to a new CPU coordinate array. Timestamp-backed trails can also fade toward the start of the visible window.
References: modules/…/arrow-path-layer.ts• L468-496 modules/…/arrow-path-layer.ts• L785-795 modules/…/arrow-trips-layer.ts• L9-34 modules/…/gpu-path-layer.ts• L24-34 modules/…/gpu-path-layer.ts• L217-233
Graph visualization
The graph feature joins GPU analysis with deck.gl display. GPUGraphDeckEffect keeps graph topology, analysis results, selection state, and progressive layout in resident GPU allocations. Node and edge layers can then display those allocations without rebuilding graph rows on the CPU.
The effect runs its analysis in stages and adds the current search and layout work to deck.gl's frame encoder. It selects exact, spatial, or sampled layout modes for graph size and can switch very large displays to point mode. Stable source vertex indices remain available for selection, neighborhood search, dragging, pinning, and picking.
References: modules/…/gpu-graph-effect.ts• L25-36 modules/…/gpu-graph-effect.ts• L97-126 modules/…/gpu-graph-effect.ts• L149-184 modules/…/gpu-graph-effect.ts• L297-330 modules/…/gpu-graph-effect.ts• L372-414 modules/…/gpu-graph-effect.ts• L423-474
Particle and scene layers
Particle layers turn changing GPU state into visible motion. Flow and scientific-wind layers read current and previous simulation state to draw short streaks. They do not own the simulation step, so another system can update the state that the layer reads.
Weather layers generate rain or snow in local meter space and can use surface elevation to fade particles near the ground. Water layers shade caller-provided triangles with luma.gl materials. Sky layers share observer and astronomy time across the sun, moon, stars, atmosphere, and the cloud variant that matches the active map or globe view.
Scene motion support can reconstruct screen velocity from captured depth and camera transforms. This gives downstream effects a motion field without changing the scene geometry itself.
References: modules/…/flow-particle-layer.ts• L19-33 modules/…/wind-particle-layer.ts• L19-28 modules/…/weather-particle-layer.ts• L30-41 modules/…/water-surface-layer.ts• L24-49 modules/…/scene-velocity-model.ts• L29-67 modules/…/atmosphere-layer.ts• L11-18 modules/…/cloud-layer.ts• L12-18 modules/…/globe-cloud-layer.ts• L17-20 modules/…/sky-layer.ts• L27-45 modules/…/sky-layer.ts• L60-118
Geographic point queries
GPUSpatialGeographicPointQueryEffect keeps a resident geographic point window on WebGPU. It projects packed longitude and latitude rows into local kilometres, builds a grid index once, and runs viewport and radius selections on the GPU for each needed frame.
The effect exposes point IDs and indirect draw commands for both outputs. GPUSpatialPointLayer consumes those commands instead of receiving a copied filtered point list through JavaScript. Selection changes and viewport changes request another deck.gl frame. Optional asynchronous counters and command-graph inspection report query work without blocking rendering.
References: modules/…/gpu-spatial-geographic-point-query-effect.ts• L94-145 modules/…/gpu-spatial-geographic-point-query-effect.ts• L208-252 modules/…/gpu-spatial-geographic-point-query-effect.ts• L456-536 modules/…/gpu-spatial-geographic-point-query-effect.ts• L573-599 modules/…/gpu-spatial-point-layer.ts• L20-55 modules/…/gpu-spatial-point-layer.ts• L179-203 modules/…/gpu-spatial-point-layer.ts• L244-310
Data and render flow
The layer system turns a columnar or GPU-resident source into a deck.gl draw while preserving source identity. The shared hand-off is a luma.gl GPU data object, buffer, texture, or renderer that deck.gl binds during its own render cycle.
This diagram shows the main paths for Arrow data, caller-owned GPU data, and GPU-selected records.
flowchart LR
A[Arrow table, batch, or stream] --> B[Arrow layer input]
B --> C[Arrow or GeoArrow renderer]
C --> D[GPUVector or renderer-owned GPU state]
D --> E[deck.gl layer]
F[Caller-owned GPUVector] --> E
G[GPU-selected IDs and draw commands] --> E
E --> H[luma.gl model and shader modules]
H --> I[deck.gl render pass]
Fixed-width Arrow adapters create vectors from source columns and release those vectors when the layer changes or finalizes. GPU-native layers borrow caller-owned vectors, buffers, textures, and simulation state. Streamed path, polygon, and text layers append renderer-owned batches and retain batch-to-row mappings for picking. GPUSpatialPointLayer borrows the position, ID, and indirect draw resources produced by a spatial query.
Arrow streams add one more step when a style column is optional. The layer inspects the first record batch and replays it before consuming the rest of the stream. This lets it choose a default without losing the first batch.
References: modules/…/arrow-gpu-layer-utils.ts• L17-39 modules/…/arrow-layer-input.ts• L196-253 modules/…/arrow-path-layer.ts• L635-651 modules/…/arrow-polygon-layer.ts• L345-445 modules/…/arrow-text-layer.ts• L542-713 modules/…/gpu-vector-layer-utils.ts• L12-58 modules/…/gpu-spatial-point-layer.ts• L179-183 modules/…/gpu-spatial-geographic-point-query-effect.ts• L94-106
Luma runtime and data systems
GPUVector data model
GPUVector is luma.gl's description of GPU-resident column data. It carries a logical row count, a GPU format, and one or more physical data chunks. A chunk can represent an Arrow record batch or another application-owned allocation.
GPU vector layers require related columns to have matching row counts and chunk boundaries. This allows each physical batch to render without merging buffers. Global row indices remain stable for picking and application metadata.
References: modules/…/gpu-vector.ts• L138-166 modules/…/gpu-vector-model.ts• L20-40 modules/…/gpu-vector-layer-utils.ts• L40-58 modules/…/arrow-layer-input.ts• L36-59
Luma rendering stack
The packages use luma.gl as the runtime that connects data to GPU execution. Core luma.gl services provide devices, buffers, textures, render passes, and models. Its GPU data services provide vectors and batch-aware models. Its Arrow and engine services provide path, polygon, and text renderers that keep source data close to GPU preparation.
Deck-facing layers add deck.gl viewport, opacity, highlighting, and picking behavior around that bridge. The result is one scene contract even when a layer uses a direct GPU model, a streamed Arrow renderer, or a graph command graph.
References: modules/…/arrow-layer-input.ts• L5-14 modules/…/arrow-path-layer.ts• L16-34 modules/…/arrow-polygon-layer.ts• L16-35 modules/…/arrow-text-layer.ts• L16-37 modules/…/gpu-vector-layer-utils.ts• L6-10 modules/…/gpu-graph-effect.ts• L5-24
Runtime boundaries
The normal render flow belongs to deck.gl. A layer binds its luma.gl model during the deck.gl draw pass. An effect adds GPU work to the current frame instead of submitting an unrelated render queue. Simulation, graph, and query layers follow the same boundary by reading or encoding current state during that frame.
WebGPU is required for the storage-oriented GPU layers, graph effect, query effect, and scientific-flow features. Several visual layers and Arrow attribute models support WebGL2. Arrow path rendering selects an attribute model on WebGL2 or a storage model on WebGPU. Text can fall back from storage expansion to an attribute model when the device does not support the required text path.
References: modules/…/arrow-path-layer.ts• L1195-1205 modules/…/arrow-text-layer.ts• L786-803 modules/…/gpu-graph-effect.ts• L149-179 modules/…/gpu-arc-layer.ts• L144-146 modules/…/gpu-line-layer.ts• L107-115 modules/…/gpu-path-layer.ts• L191-195 modules/…/flow-particle-layer.ts• L67-80 modules/…/gpu-spatial-geographic-point-query-effect.ts• L208-212
Ownership and integration
Buffer ownership
Ownership follows the direction of data flow. An application retains responsibility for GPU data passed to GPU-native layers. An Arrow adapter owns the vectors it creates. A layer owns its models and private style resources. A particle or graph layer borrows shared state and does not advance or destroy that state.
This boundary lets applications share resident data across layers and effects. It also means that borrowed data must remain alive until every dependent layer and effect is finalized. Converted color vectors are temporary adapter resources when luma.gl must normalize them for a renderer or readback.
References: modules/…/arrow-gpu-layer-utils.ts• L88-91 modules/…/arrow-layer-input.ts• L80-123 modules/…/arrow-path-layer.ts• L748-776 modules/…/arrow-polygon-layer.ts• L303-311 modules/…/arrow-text-layer.ts• L522-539 modules/…/gpu-vector-layer-utils.ts• L118-134 modules/…/gpu-spatial-point-layer.ts• L179-183 modules/…/flow-particle-layer.ts• L19-24
Related deck.gl systems
This page describes the layer packages beneath the wider deck.gl integration surface. Read core API for deck.gl's layer, view, effect, and picking contracts. Read data interchange formats for the data formats that can feed visualization systems.
For the wider asset flow, read data and visualization assets. For the shared device and render platform, read rendering runtime platforms. For GPU processing and visual effects, read GPU compute and effects. For graph-specific analysis and display, read GPU graph systems.
The key relationship is that deck.gl supplies the scene contract. These packages supply GPU-oriented data adapters, renderers, graph work, simulations, and spatial query effects. They do not replace deck.gl's general data model or its support for other input formats.
References: modules/…/arrow-layer-types.ts• L9-19 modules/…/arrow-solid-polygon-layer.ts• L22-33 modules/…/index.ts• L5-28 modules/…/sky-layer.ts• L41-55
Change checklist
When these files or sections are changed, remember to consider these:
- Keep GPU vector row counts and physical batch boundaries aligned across every accessor consumed by one layer.
- Keep Arrow source columns, null replacements, color conversion, and direct GPU vector inputs consistent with the selected renderer.
- Keep Arrow stream inspection replayable so resolving an optional column does not consume the first record batch.
- Keep path batch offsets, temporal inputs, view origins, and picking row identity aligned when changing streamed or direct path rendering.
- Keep the selected path, polygon, or text model compatible with the active device and with any direct GPU style source.
- Keep icon atlas names, atlas frames, offsets, color modes, and Arrow rows aligned when changing icon data.
- Keep graph positions, source and target indices, analysis buffers, selection state, and stable vertex indices aligned across node and edge layers.
- Keep shared flow textures or scientific-flow buffers alive and bind the current and previous state from the same simulation.
- Keep weather surface bounds and elevation texture coordinates in the same local meter space as the particle layer.
- Keep sky observer, astronomy timestamp, view type, and cloud variant aligned across the composite sky components.
- Keep query output IDs, indirect draw counts, viewport selection, radius selection, and the
GPUSpatialPointLayercommand bindings aligned when changing GPU-selected point rendering. - Keep the spatial query's projection bounds, grid index, command graph outputs, and optional diagnostic counters aligned when changing geographic query inputs.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Related GPU vectors have different row counts or chunk boundaries | The layer cannot map attributes to the same feature rows | Validate vector shape and preserve source batch alignment |
| An Arrow column has an unsupported format or an unhandled null row | Conversion or layer creation fails instead of producing clear GPU values | Supply the expected Arrow shape or an explicit null replacement |
| A direct GPU style vector is paired with streamed Arrow path, polygon, or text data | The adapter cannot match the style rows to the streamed source | Use Arrow style data for streamed input or matching direct GPU sources |
| An Arrow color column is missing | The layer uses its configured default color | Check the source schema or set an explicit null color |
| An icon name has no atlas mapping | Icon preparation fails for that source row | Add an atlas entry for every source icon name |
| A borrowed buffer, texture, vector, or simulation is destroyed too early | Rendering or picking reads invalid GPU state | Destroy shared data only after all dependent layers and effects finalize |
| A storage model is selected on a device without WebGPU support | Layer setup fails | Select an attribute model or a device-compatible layer |
| A graph population exceeds adapter buffer limits | Graph effect construction fails | Use a device-compatible graph size or a bounded input |
| Wind or flow state comes from different current and previous simulations | Streaks show false motion or invalid bindings | Bind both states from one live simulation result |
| A geographic viewport becomes unusable after an earlier query | Stale selected points can remain visible | Clear both indirect draw counts when no usable viewport exists |
| Spatial query outputs use a different projection or command layout than the point layer expects | Selected points render at the wrong location or the indirect draw is invalid | Use the query outputs as a matched set with the same GPUSpatialPointLayer contract |
Key files
| File | Why to read it |
|---|---|
| modules/…/arrow-layer-input.ts | Defines the common Arrow, GPU vector, constant, null, and stream input boundary |
| modules/…/arrow-gpu-layer-utils.ts | Shows Arrow column validation, conversion, and adapter-owned vector lifetime |
| modules/…/arrow-layer-types.ts | Defines deck-facing viewport, blend, pipeline, and picking contracts |
| modules/…/arrow-path-layer.ts | Shows streamed paths, model choice, temporal display, and batch identity |
| modules/…/arrow-polygon-layer.ts | Shows Arrow polygon sources, color resolution, and direct GPU color limits |
| modules/…/arrow-text-layer.ts | Shows Arrow text rendering, color sources, and storage fallback |
| modules/…/arrow-icon-layer.ts | Shows Arrow icon names becoming atlas-ready GPU data |
| modules/…/gpu-graph-effect.ts | Shows graph analysis, layout, selection, and frame encoding |
| modules/…/index.ts | Shows the public GPU layer and effect surface |
| modules/…/gpu-vector-layer-utils.ts | Shows aligned GPU batches and source-row picking provenance |
| modules/…/gpu-scatterplot-layer.ts | Shows the basic GPU vector mark contract |
| modules/…/gpu-arc-layer.ts | Shows GPU vector curved arcs with per-row or constant style values |
| modules/…/gpu-column-layer.ts | Shows GPU vector extruded columns with per-row or constant style values |
| modules/…/gpu-line-layer.ts | Shows GPU vector straight lines with per-row or constant style values |
| modules/…/gpu-icon-layer.ts | Shows GPU vector icon rendering from atlas-ready metadata |
| modules/…/gpu-point-cloud-layer.ts | Shows GPU vector point-cloud positions, normals, and picking |
| modules/…/gpu-path-layer.ts | Shows direct GPU variable-path rendering and time windows |
| modules/…/gpu-polygon-layer.ts | Shows filled and stroked polygon composition |
| modules/…/flow-particle-layer.ts | Shows texture-backed particle state and motion streaks |
| modules/…/wind-particle-layer.ts | Shows scientific-flow state shared with a simulation |
| modules/…/sky-layer.ts | Shows shared sky time, observer, and map/globe composition |
| modules/…/gpu-spatial-geographic-point-query-effect.ts | Shows resident geographic indexing, viewport and radius queries, indirect outputs, and query diagnostics |
| modules/…/gpu-spatial-point-layer.ts | Shows indirect rendering of GPU-selected points |
| modules/…/scene-velocity-model.ts | Shows scene motion derived from depth and camera change |