Skip to main content

What's New

This page contains news for recent luma.gl releases. For older releases (through v8.5) refer to the Legacy What's New page.

Version 9.2 (In Development)

Target Date: Q2, 2025

Production quality WebGPU backend

General

  • TypeScript v5.6, all "strict" TypeScript options are now applied to all luma.gl modules.
  • Website tooling upgrades
  • All examples run on WebGPU
  • Documentation improvements (TBD)
  • Improved GitHub issue templates

@luma.gl/core

  • Shader type APIs have been improved.
  • CommandEncoder/CommandBuffer API improvements
  • Texture class refactors complete.
  • CanvasContext API simplifications (see upgrade guide).

@luma.gl/engine

  • AsyncTexture now supports mipmap generation for WebGPU textures

@luma.gl/effects

  • All postprocessing effects ported to WGSL (in progress)

@luma.gl/shadertools

  • All shader modules ported to WGSL (in progress)

@luma.gl/gltf

  • glTF and PRB now supported on WebGPU (in progress)

Version 9.1

Target Date: Dec, 2024

Enhanced WebGPU support.

Highlights

  • GPU backend management is streamlined via the new Adapter API.
  • GPU connection to HTML DOM (via canvas elements) improved via CanvasContext API changes.
  • Textures are now immutable, however a new AsyncTexture class offers a higher-level, mutable texture API.
  • ShaderModule type safety improvements (shader uniforms can now be strictly typed in JavaScript)

@luma.gl/core

  • Adapter
    • New class for singleton objects representing pluggable GPU backends.
    • Singleton Adapter objects are exported by the @luma.gl/webgpu and @luma.gl/webgl modules.
  • luma
    • Now relies on Adapter instances to define which GPU backends are available.
    • Adapter can be supplied during device creation, avoiding the need for global registration of GPU backends.
    • CreateDeviceProps.adapters prop to supply list of GPU backend adapters to luma.createDevice().
    • luma.registerAdapters() New method for global registration of adapters (in case it still desired).
  • Device
    • DeviceProps.createCanvasContext - New prop for creating a default CanvasContext.
    • DeviceProps.onResize - New callback tracking size changes to CanvasContexts.
    • DeviceProps.onVisibilityChange - New callback tracking visibility to CanvasContexts.
    • DeviceProps.onDevicePixelRatioChange - New callback tracking device pixel resolution (DPR) changes to CanvasContexts.
    • DeviceProps.debug* - New debug options, please refer to DeviceProps documentation.
  • CanvasContext
    • Now calculates exact "device pixel content box" size enabling pixel perfect sized drawing buffers (no moire etc).
    • Now tracks size, visibility and DPR changes (see the new DeviceProps callbacks).
  • Texture
    • Textures are now immutable and synchronous. See upgrade guide, and the new AsyncTexture class in @luma.gl/engine.
    • Texture.copyExternalImage() New function that works on both WebGPU and WebGL.
    • Texture.copyImageData() New function that works on both WebGPU and WebGL.
  • Sampler
    • SamplerProps.mipmapFilter New value 'none' providing more explicit control over mipmap filtering.
  • RenderPipeline
    • Parameters.blend - New parameter that provides more explicit control over color blending activation.
  • RenderPass
    • RenderPassProps.clearColors - New prop enables specification of clear colors for multiple color attachments.

@luma.gl/engine

  • makeAnimationLoopTemplate
    • Accepts a new .adapters prop. (Avoids need for global registration of adapters).
  • AsyncTexture](/docs/api-reference/engine/async-texture)
    • New class allows that applications to work withcreate textures from a Promise.
  • ShaderPassRenderer
    • New class that helps applications apply a ShaderPass list to a texture.

@luma.gl/shadertools

  • [ShaderModule](/docs/api-reference/shadertools/shader-module)
    • New improvements to type safety, in particular for uniforms and bindings.
    • New simplified API, no longer required to instantiate modules into ShaderModuleInstances.
  • getShaderModuleUniforms(module: ShaderModule, ...) New function
  • getShaderModuleDependencies(module: ShaderModule) New function

@luma.gl/webgl

  • webglAdapter
    • New object representing the WebGL backend
    • New: adds mock WEBGL1 extensions to WebGL2 contexts for better compatibility with old WebGL libraries
    • Big texture refactor to align WebGL implementation with WebGPU APIs
  • RenderPipeline
    • WebGL render pipelines now support frame buffers with multiple color attachments.
  • RenderPass
    • Now supports framebuffers with multiple color attachments.

@luma.gl/webgpu

  • webgpuAdapter New object representing the WebGPU backend
  • Numerous under-the-hood improvements and bug fixes

Version 9.0

Target Date: Feb 2024

caution

luma.gl v9 contains significant API changes and requires existing luma.gl v8 applications to be upgraded.

luma.gl v9 is a major release that adds experimental WebGPU support to the luma.gl API.

WebGPU Support

The biggest change is that the core API is now portable (no longer WebGL-specific), and plug-in backends are provided for WebGL 2 and WebGPU:

  • Portable GPU API: @luma.gl/core now provides a portable GPU resource management API.
  • WebGL bindings: @luma.gl/webgl now provides a WebGL backend for the core API.
  • WebGPU bindings: @luma.gl/webgpu provides a new experimental WebGPU backend for the core API.

WebGL Support

luma.gl v9 drops support for WebGL 1 functionality.

  • WebGL1 WebGL 1 support is dropped.
  • GLSL 1.00 is no longer supported. GLSL shaders need to be ported to GLSL 3.00.
  • headless-gl The Node.js WebGL 1 integration is no longer supported

On the upside this means that all features requiring WebGL 2 are now available and luma.gl also brings support for a range of new WebGL 2 extensions, see more below.

New module structure

ModuleImpactDescription
@luma.gl/coreNew APIThe new portable luma.gl GPU API. Applications can run on both WebGPU and WebGL2 devices.
@luma.gl/engineLight API updatesClassic luma.gl engine classes ()Model, AnimationLoop etc), which work portably on both WebGPU and WebGL 2.
@luma.gl/gltfRenamed moduleNew module that exports the glTF classes (moved from @luma.gl/experimental).
@luma.gl/shadertoolsLight API updatesThe shader assembler API and the shader module library.
@luma.gl/webglWebGL backendOptional "GPU backend module". Importing this module enables the application to create WebGL 2 Devices.
@luma.gl/webgpuWebGPU backendExperimental "GPU backend module". Importing this module enables the application to create WebGPU Devices.

General improvements

  • TypeScript: All APIs now rigorously typed.
  • ES modules - Modern ES module and CommonJS entry points for maximum interoperability.
  • Website - New Docusaurus website with more embedded live examples and improved documentation.
  • Debugging - SpectorJS integration. Shader debugger UI.

New features

@luma.gl/core

  • Exports the new Device class is the entry point to the luma.gl API, used to create other GPU resources.

@luma.gl/engine

  • NEW: Scenegraph classes: ModelNode, GroupNode, ScenegraphNode, moved from @luma.gl/experimental.
  • NEW: ShaderInputs - Class that manages uniform buffers for a Model
  • NEW: ShaderFactory - Creates and caches reusable Shader resources
  • NEW: AnimationLoopTemplate - Helper class for writing cleaner demos and applications in TypeScript.
  • New Computation - Class that manages a ComputePipeline similar to Model and Transform.

@luma.gl/gltf

  • New module that exports the glTF classes (moved from @luma.gl/experimental).

@luma.gl/shadertools

  • All shader modules now use uniform buffers.
  • New ShaderAssembler class that provides a clean entry point to the shader module system.
  • New CompilerMessage type and formatCompilerLog function for portable shader log handling.
  • Shader assembly now supports WGSL and single shader source (compute or single vertex+fragment WGSL shaders)

@luma.gl/webgl

  • The new bindings API now supports WebGL 2 Uniform Buffers.

WebGL 2 Extension support: WebGL is not dead yet! Browsers (Chrome in particular) are actively developing "extensions" for WebGL 2, and luma.gl is exposing support for many of the new WebGL extensions through the DeviceFeatures API.

New Device.features that improve application performance in WebGL:

  • compilation-status-async-webgl: Asynchronous shader compilation and linking is used automatically by luma.gl and significantly speeds up applications that create many RenderPipelines.

New Device.features that enable additional color format support in WebGL:

  • rgb9e5ufloat-renderable-webgl: rgb9e5ufloat is renderable.
  • snorm8-renderable-webgl: r,rg,rgba8snorm are renderable.
  • norm16-renderable-webgl: r,rg,rgba16norm are renderable.
  • snorm16-renderable-webgl: r,rg,rgba16snorm are renderable.

New Device.features that expose new GPU parameters in WebGL:

  • depth-clip-control: parameters.unclippedDepth - depth clipping can now be disabled.
  • provoking-vertex-webgl: parameters.provokingVertex - controls which primitive vertex is used for flat shading.
  • polygon-mode-webgl: parameters.polygonMode - enables wire frame rendering of polygons.
  • polygon-mode-webgl: parameters.polygonOffsetLine - enables depth bias (polygon offset) for lines.
  • shader-clip-cull-distance-webgl: parameters.clipCullDistance0-7, also see GLSL effects below.

New Device.features that enable new GLSL syntax

  • shader-noperspective-interpolation-webgl: GLSL vertex outputs and fragment inputs may be declared with a noperspective interpolation qualifier.
  • shader-conservative-depth-webgl: GLSL gl_FragDepth qualifiers depth_any depth_greater depth_less depth_unchanged can enable early depth test optimizations.
  • shader-clip-cull-distance-webgl: Enables gl_ClipDistance[] / gl_CullDistance[].