[Tracking] Graphics Modernization (GM)

Author: birkskyumCreated May 15, 2026Updated Sep 28, 2026
Labelsenhancementperformancemeta

After sunsetting WebGL1 as part of GL JS v6 ( #3947 ) we are positioned to move the graphics pipeline forward towards a modern WebGL2 and WebGPU dual renderer. This is a tracking ticket for that modernization.

Phase 1 - Complete - WebGL2 Pre-Architectural Improvements - WebGL2 improvements that don't depend on the Drawable architecture from Phase 3. Texture allocation, shader attribute declaration, vertex attribute binding, and modern GLSL ES 3.00 features.

  • #7641
  • #7643
  • #7644
  • #7661
  • #8130
  • #8143
  • #8145

Phase 2 - Shared rendering state - Move projection, terrain and per-frame shader values into shared std140 UBOs. Bring shared rendering inputs together in the render context, so they're clearer to use, don't need to be set up separately for each draw, and drawing code doesn't need the painter.

  • #8290
  • #8304
  • #8306
  • #8313
  • #8318
  • #8455
  • #8462
  • #8545
  • #8568
  • GM2.10 Move program lookup and depth and color modes to the frame render context
  • GM2.11 Move stencil clipping to the frame render context
  • GM2.12 Move the remaining frame data to FrameRenderData
  • GM2.13 Prepare tile projection and terrain data before drawing
  • GM2.14 Replace the transform in draw code with CameraData
  • GM2.15 Make the projection math functions of CameraData
  • GM2.16 Remove the style reference from the painter

Checkpoint - Fix the horizon sky/atmosphere

  • #8299
  • #8464
  • #8466

Phase 3 - Drawable Rendering Architecture - Each draw call becomes a persistent Drawable that keeps its geometry, shader, textures and settings between frames, following maplibre-native's drawable / tweaker design. Shader values move into uniform buffers that are only uploaded when they change. Layers move one at a time, and each PR replaces the old draw code instead of keeping both.

  • #8556
  • GM3.2 Move background shader values into uniform buffers
  • GM3.3 Move sky, atmosphere, terrain, debug and layer opacity shader values into uniform buffers

Checkpoint - Fix the horizon fog

  • #4985
  • #4986
  • #4337
  • GM3.4 Move fill and its outline to drawables
  • GM3.5 Move fill shader values into uniform buffers, including data-driven properties
  • GM3.6 Move line and its variants to drawables
  • GM3.7 Move line shader values into uniform buffers
  • GM3.8 Move circle to drawables and uniform buffers
  • GM3.9 Move fill extrusion to drawables and uniform buffers
  • GM3.10 Move raster to drawables and uniform buffers
  • GM3.11 Move hillshade and color relief to drawables and uniform buffers
  • GM3.12 Move heatmap to drawables and uniform buffers
  • GM3.13 Move symbol to drawables
  • GM3.14 Move symbol shader values into uniform buffers
  • GM3.15 Remove the old uniform setters
  • Closes #4511

Phase 4 - Instanced Rendering - Draws repetitive features in bulk with WebGL2 instancing. Circles first, symbols if measurements justify it.

  • GM4.1 Add instancing to the Drawable contract
  • GM4.2 Instance circles
  • GM4.3 Instance symbols

Phase 5 - WebGPU Backend - A second executor (WebGPUDrawable) over the same drawables and block layouts, shipped as a lazily loaded chunk so the main bundle keeps one renderer.

  • GM5.1 Add the async renderer lifecycle seam and WebGPU device initialization, based on ibgreen's staged work
  • GM5.2 Add the WebGPU render pass and stencil clipping
  • GM5.3 Add backend-owned buffers
  • GM5.4 Render background end to end on WebGPU
  • GM5.x Move the remaining layers to WebGPU
  • Closes #2606
  • Supersedes #7411

Phase 6 - Evaluate luma.gl for shared WebGPU/WebGL2 code - There are PoC's that show a luma.gl backend is feasible on the current code. luma.gl v10 develops in parallel with Phases 3 to 5; once both GL JS backends exist, the question is whether luma.gl can replace the shared implementation layer, be offered as an optional backend next to it, or not be adopted.

  • GM6.1 Rebase the luma.gl evaluation onto the finished drawable architecture and luma.gl v10, and measure code, bundle chunk size, performance and feature coverage
  • GM6.2 Decide between adopting luma.gl, offering it as an optional backend, or staying direct
  • GM6.x Implement the decision
  • Closes #6206