Back to Journal
Visualization 17 December 2024 12 min read Sheece Gardezi

deck.gl v9 Ships WebGPU: What Changes for Geospatial

The first geospatial vis library on WebGPU. deck.gl v9 rewrites the rendering pipeline via luma.gl v9, unlocking compute shaders and GPU-driven layer updates.

deck.glWebGPUluma.glGeospatialPerformance
Abstract data visualization with glowing points and lines
Luke Chesser on Unsplash

A hexbin aggregation of one million points: 200ms on CPU, under 10ms with WebGPU compute shaders. deck.gl v9 is the first major geospatial visualization library built on WebGPU, backed by a full rewrite of luma.gl as a WebGPU-first rendering engine with WebGL2 fallback. The core geometry layers ship today; GPU aggregation landed in v9.1; compute-shader-powered filtering and clustering are next.

Why WebGL's 2011 Architecture Reached Its Limit

WebGL reflects GPU architectures from 2011. Compute shaders, storage buffers, and GPU-driven rendering are inaccessible. WebGPU maps directly to Vulkan, Metal, and DirectX 12, unlocking the hardware capabilities that shipped in GPUs years ago.

For geospatial visualization, the impact is concrete. Operations that required CPU preprocessing -- spatial aggregation, dynamic filtering, point clustering -- move entirely to the GPU. CPU-GPU roundtrips shrink because WebGPU batches commands explicitly rather than relying on WebGL's hidden state machine.

deck.gl is designed to simplify high-performance, WebGL2/WebGPU based visualization of large data sets. While WebGPU support is a work in progress, under the hood, WebGPU enablement has been in progress for several years and a lot of work has been completed.
deck.gl Documentation

luma.gl v9: WebGPU-First with WebGL2 Fallback

The deck.gl WebGPU story is a luma.gl story. luma.gl is the GPU abstraction layer powering deck.gl's rendering. In v9 it was rewritten with a WebGPU-first architecture and pluggable backends -- WebGL2 ships as a fallback adapter. Same application code, same visual output, automatic backend selection.

Browser support is reaching critical mass. Safari shipped WebGPU in late 2024. Firefox followed in early 2025. Chrome has supported it since mid-2023. The dual-backend design means production apps can adopt WebGPU progressively without dropping older browsers.

WebGPU's Architectural Advantages

  • Modern GPU architecture — Direct access to compute shaders, storage buffers, and GPU-driven rendering
  • Reduced CPU overhead — Command recording and batching minimize JavaScript-to-GPU roundtrips
  • Cross-platform consistency — Same API across desktop browsers, mobile, and native applications
  • Explicit resource management — Predictable performance without WebGL's hidden state machine
  • Future-proof design — Aligned with Vulkan/Metal/DirectX12 concepts

v9.1: GPU Aggregation Restored, 5-20x Faster Than CPU

v9.0 shipped GPU aggregation layers as CPU fallbacks -- a deliberate tradeoff to land the WebGPU foundation first. v9.1 restores full GPU aggregation with a refactored Aggregator interface. For datasets exceeding 100K points, GPU aggregation delivers 5-20x performance improvement.

v9.1 Key Features

GPU aggregation restored

Full GPU-powered aggregation layers with new Aggregator interface

Uniform buffer migration

All shaders now use WebGPU-compatible uniform buffers

HexagonLayer GPU support

Enable with gpuAggregation: true for massive performance gains

MapLibre Globe integration

Seamless overlay on MapLibre v5's new globe projection

React widget system

Declarative UI components for map interactions

The new Aggregator interface is particularly important. It provides a generic abstraction for spatial aggregation operations—CPUAggregator and WebGLAggregator ship today, with WebGPUAggregator on the roadmap. Custom aggregations (weighted means, percentiles, custom binning) can now plug into this interface.

Enabling WebGPU: One Adapter Import

WebGPU requires explicit opt-in via luma.gl's adapter system. The change is minimal -- one import and one config property.

deckgl-webgpu-setup.js
import { Deck } from '@deck.gl/core';
import { webgpuAdapter } from '@luma.gl/webgpu';
import { ScatterplotLayer } from '@deck.gl/layers';

// Initialize deck.gl with WebGPU adapter
const deck = new Deck({
  deviceProps: {
    adapters: [webgpuAdapter]
  },
  initialViewState: {
    longitude: -122.4,
    latitude: 37.8,
    zoom: 11
  },
  controller: true,
  layers: [
    new ScatterplotLayer({
      id: 'scatterplot',
      data: points,  // millions of points
      getPosition: d => d.coordinates,
      getRadius: 100,
      getFillColor: [255, 140, 0]
    })
  ]
});

GPU HexagonLayer: Real-Time Binning at 100K+ Points

HexagonLayer bins hundreds of thousands of points into hexagonal cells, computing color and elevation from aggregate statistics in real-time as the user pans and zooms. With gpuAggregation: true, binning and statistics run entirely on the GPU.

gpu-aggregation.js
import { HexagonLayer } from '@deck.gl/aggregation-layers';

// GPU-accelerated hexbin aggregation
new HexagonLayer({
  id: 'hexagons',
  data: earthquakes,  // 100k+ points
  getPosition: d => [d.longitude, d.latitude],
  getElevationWeight: d => d.magnitude,
  elevationScale: 1000,
  extruded: true,
  radius: 2000,
  coverage: 0.9,

  // Enable GPU aggregation (v9.1+)
  gpuAggregation: true,

  // Custom aggregation operations
  elevationAggregation: 'MAX',
  colorAggregation: 'MEAN'
});

WebGPU Layer Support: What Ships Today

WebGPU support is rolling out layer by layer. Core geometry layers are production-ready. Aggregation layers shipped in v9.1. GPU-based picking and filtering are next:

  • Production ready — ScatterplotLayer, PathLayer, PolygonLayer, GeoJsonLayer, IconLayer
  • GPU aggregation — HexagonLayer, ScreenGridLayer (v9.1+)
  • On roadmap — WebGPUAggregator for custom aggregations
  • Coming soon — ContourLayer, HeatmapLayer with compute shaders
  • Experimental — Point cloud and 3D tiles with WebGPU backends

MapLibre v5 Globe + deck.gl: Full-Stack WebGPU

MapLibre Native now supports WebGPU backends. The experimental MapLibre Tile (MLT) format is designed for GPU-driven rendering. deck.gl v9.1 adds seamless MapLibre globe integration, overlaying analytical layers on MapLibre v5's globe projection.

The trajectory: basemaps, analytical layers, 3D buildings, and terrain all running on WebGPU. Complex dashboards with millions of features rendering at consistent 60fps.

Where WebGPU Delivers the Biggest Gains

10M+ point datasets -- 2-3x improvement from reduced draw call overhead. Hexbin/grid aggregation -- 5-20x faster when computation moves to compute shaders. DataFilterExtension -- significant gains from GPU-powered category filtering. For simpler visualizations under 100K features, WebGL2 is already well-optimized and the difference is marginal.

Adoption Strategy: WebGL2 Today, WebGPU Default in 12-18 Months

Use WebGL2 mode for production today. Experiment with WebGPU on internal tools. Plan for WebGPU as the default within 12-18 months. The API is stable; browser support and edge cases are what still need maturation.

The larger shift: operations currently preprocessed server-side -- spatial clustering, interpolation, kernel density estimation -- move to client-side GPU execution via compute shaders. The boundary between "visualization" and "analysis" dissolves when the GPU handles both.

Have a project in mind?

Location

  • Canberra
    ACT, Australia