Skip to main content

Legacy What's New


This page contains release notes for older releases (up through v8.5). For v9, refer to the main Whats' New page.

Version 8.5

Date: Jul 15, 2021

  • GLSL transpiler now handles gl_FragColor in fragment shader when transpiling from ES 1.00 to 3.00
  • New magnify effect

  • Support for compressed textures in glTF.
  • Now exports GLTFMaterialParser

Version 8.4

Date: Feb 1, 2021

  • TypeScript - type definitions are now included in all modules. There should no longer be a need to install external type packages.
  • Texture - Supports continuous update from HTMLVideoElement.
  • createGLContext() - adds optional callbacks onContextLost, onContextRestored.

Version 8.3

Date: Oct 12, 2020

  • TypeScript - definitions are available for module classes (Buffer, Texture, etc.)
  • glTF - Support for PBR material.unlit

Version 8.1

Date: March 2, 2020

GPU-accelerated point-in-polygon tests

The experimental GPUPointInPolygon class performs GPU-accerated point-in-polygon tests, which showed a massive improvement in performance over a CPU implementation of the algorithm:


Numbers shown are iterations/second.

Improved vertex array object support in WebGL 1

Handling of platforms that do not support vertex array objects has been significantly improved, providing a more stable experience in IE 11 and headless-gl.

GLSL 3.0 to 1.0 transpilation

assembleShaders now optionally attempts to transpile shaders from GLSL 3.0 to 1.0, potentially simplifying shader management in systems where both WebGL 1 and 2 are used. Refer to [the documentation]( /docs/api-reference/shadertools/shader-assembler#transpilation) for more information.

Version 8.0

Date: December 16, 2019


The key focus of v8.0 was optimizing performance. Compared to v7.3, the latest release shows a 2x improvement in render time on the stress test (1 million textured cubes), as detailed below:

CPU Time30ms16ms14ms (47%)
GPU Time26ms21ms5ms (19%)'s optimizations also contributed significantly to's performance gains in v8.0, leading to a 3x improvement over its prior release on the stress test (rendering 100,000 ScatterplotLayer instances):

CPU Time76ms26ms50ms (66%)
GPU Time17ms10ms7ms (41%)

Stress tests were run on a Macbook Pro 2018, OSX, 2.6 GHz Intel Core i7, Radeon Pro 560X 4 GB.

Streamlined API v8.0 also brings with it a major simplification of the API and streamlining of architecture. The number of modules as been reduced from 14 to 9, each with a clearly defined purpose and relationship to other modules:

  • Low-level
    • constants: WebGL 1 and 2 enums.
    • gltools: Tools for polyfilling, intrumenting and tracking state for WebGL contexts.
    • shadertools: Tools for creating and composing re-usable GLSL shader modules.
  • Mid-level
    • webgl: WebGL 1 and 2 wrapper classes.
  • High-level
    • engine: Higher-level 3D graphics abstractions and resource management.
  • Utilities
    • debug: Debug instrumentation for WebGL contexts and classes.
    • test-utils: Testing utilities.
    • core: Selected re-exports from other modules.
    • experimental: Unfinished and unsupported features.

Version 7.3

Date: September 19, 2019

Program Management introduces the ProgramManager class to manage caching and re-use of Program objects, providing powerful load and runtime optimizations:

  • Redundant shader compilation and linking is avoided.
  • Redundant program switching (among the most expensive GPU state changes) while rendering is avoided.

The Model class has been updated to take advantage of these new capabilities, automatically caching and re-using Programs where possible.

The table below shows the effect of program sharing in The test renders 1000 ScatterplotLayers, each of which draws 100 intanced geometries, for a total of 1000 draw calls and 100,000 instances. Timings are milliseconds spent on the CPU and GPU to render a single frame on the following two machines:

  • Macbook Pro 2018, OSX, 2.6 GHz Intel Core i7, Radeon Pro 560X 4 GB
  • Razer Blade, Windows 10, Intel i7-8750H 6 Core, Intel UHD Graphics 630
No Program SharingProgram SharingImprovement
Macbook Pro CPU113ms93ms17%
Macbook Pro GPU43ms34ms20%
Razer Blade CPU145ms125ms13%
Razer Blade GPU137ms115ms16%

Custom Device Pixels (Experimental) now provides experimental support for specifying the pixel ratio mapping between canvas size and the GL drawing buffer. has always provided support for matching the native device pixel ratio on high-resolution screens, but custom ratios allow applications to, for example, use SSAA for improved fidelity or reduced drawing resolution to improve performance.

Version 7.2

Date: July 9, 2019

FXAA Shader Module now supports FXAA (Fast Approximate Antialiasing) as a post processing effect. This allows for antialiasing on offscreen framebuffers.

ImageBitmap Textures

The Texture class now supports ImageBitmap input data.

Version 7.1

Date: June 4, 2019

Enhanced Shader Injection System now supports a much more robust system for injecting code into shaders. In addition to the pre-defined shader hooks such as vs:#main-start, the shader injection system now supports:

  • Definition of arbitrary shader hook functions that can be called anywhere in a shader
  • Injection of arbitrary code into shader hook functions to modify their behavior
  • Automatic injection by shader modules into hook functions or pre-defined shader hooks

The combination of these features allows the behavior of the same shader code to be modified depending on included shader modules or other requirements of the application. See assembleShaders documentation for more details.

Animation Support

More robust animations are now supported via the Timeline and KeyFrames classes.

The Timeline class supports easily managing a timeline with multiple channels elapsing at different rates, as well as orchestrating playing, pausing, and rewinding behavior between them. A timeline can be attached to an AnimationLoop and then queried for time values, which can be used in animations. See Timeline documentation for more details.

The KeyFrames class allows arbitrary data to be associated with time points. The time value of the key frames can be set and the current key frames and interpolation factor can be queried and used in calculating animated values. See KeyFrames documentation for more details.

Version 7.0

Date: April 19, 2019

glTF Support can now load 3D models and scenegraphs in the popular glTF™ asset format (with the help of the GLTFLoader. All variants of glTF 2.0 are supported, including binary .glb files as well as JSON .gltf files with binary assets in base64 encoding or in separate files. The Draco Mesh compression extension is also supported.

  • Physically-based Material Support: Ensures that PBR models display as intended.
  • Scenegraph Improvements: The Scenegraph classes have been refactored to ensure support for glTF objects.
  • Geometry glTF Support: The Geometry class and scene graph support has been overhauled to conform to glTF conventions, simplifying loading and manipulation of glTF formatted data. Integration is a major new companion framework to that provides a suite of 3D file format loaders (with an emphasizis on point cloud formats), including:

  • Draco
  • PLY
  • PCD
  • OBJ output can now be passed directly into classes like Geometry and Model making it straightforward to use with a wide variety of file formats.

Asynchronous Textures

Image data for Texture classes can now be supplied using URLs or Promises, making it unnecessary for applications to handle image loading themselves.

new Texture2D(gl, 'path/to/my/image.png'); // Texture2D will load the image and becomes 'renderable' once it loads
// or
new Texture2D(gl, loadImage('path/to/my/image.png')); // loadImage returns a promise


A standardized set of light classes are now supported by multiple material models (Phong, Gouraud and PBR) enabling various models to be mixed and properly lit in the same scene.

Modularization Improvements

  • has been restructured to make it easier for applications to select and import only parts of the library that they use.
  • New - A new experimental submodule with GPGPU Algorithms and Utilities has been added, containing a growing collection of GPU accelerated algorithms and utility methods.

Performance Instrumentation

Extensive metrics about frame CPU and GPU times, resource counts, and GPU memory usage are being collected. The data is exposed as a Stats object. The new StatsWidget can be used to present data in applications.

Interleaved Attributes

To improve support for interleaved attributes and glTF model loading, accessor objecs and the Accessor class now support a buffer field. In addition, attribute setting functions now accept accessor objects with the buffer field set. This allows multiple accessor objects referencing the same buffer:

const buffer = // "interleaved" vertex attributes: 3 floats for position followed by 4 bytes for RGBA
positions: {buffer, stride: 16, offset: 0, ...}}),
colors: {buffer, stride: 16, offset: 12, ...}})

Unified functions for Framebuffers and Textures (Read/Copy/Blit)

A set of global methods that perform copying data to and from Framebuffer objects. All functions that read from or write to a Framebuffer object now also accept a Texture object (no need to create and configure a Framebuffer just to do a simple operation on a Texture).

WebVR Support (experimental)

Just replace your AnimationLoop with VRAnimationLoop from Works with Firefox Reality.

Version 6.4

Date: January 29, 2018

PBR (Physically Based) Rendering and Material

Physically-Based Rendering is now supported and the new PBRMaterial class can be used to set up parameters. Material can be selected per model.

Copy and Blit methods

Several member function of Framebuffer and Texture classes are now replaced by global methods that peform copying data to and from Framebuffer objects. All methods that read from or write to a Framebuffer object, can now also accept a Texture object.

Version 6.3

Date: November 16, 2018

Uniform Caching

Uniforms are now cached at Program object, which improves performance by eliminating uniform setter calls when uniform values are not changed.

New submodules

  • - an experimental module for debugging WebGL shaders on CPU
  • - shader modules for image processing

Offscreen Rendering (Experimental)

A new experimental class AnimationLoopProxy supports running an AnimationLoop on a worker thread using the OffscreenCanvas API made official in Chrome 70. For more detatils, see the example app.

Version 6.2

Date: September 12, 2018

ShaderModulePass (Experimental)

Shader modules that expose "standard" filtering and sampling functions can be given extra metadata (the passes field) enabling easy construction of a ShaderModulePass. Look for ShaderPass badges in the documentation of shader modules.

Transform Texture support (Experimental)

Transform class was introduced in 6.0 provides easy API to perform WebGL's complicated TransformFeedback. We are now extending this class to provide same easy API to read and write into textures. Running image filters, performing offline rendering and custom texture mip-map generation are some of the use-cases. Moreover, texture and buffer access can be combined, i.e. using single Transform instance buffers can be captured using TransformFeedback and data can be propagated beyond vertex shader to generate a texture.

Version 6.1

Date: Target August 31, 2018 6.1 is a minor release that introduces a number of new experimental capabilities that are expected to be built out and become official over the next few releases.

New Multipass Rendering System (Experimental) now provides a composable multipass rendering framework, based on a MultiPassRenderer class that accepts a list of render passes.

Post-Processing Effects (Experimental)

A number of classic WebGL/OpenGL post processing effects have been ported to and packaged as composable render passes. For maxiumum flexibility, many of the underlying shaders have also been exposed as shader modules, allowing filtering features to be used either directly in existing shaders or applied as a post-processing filter.

New Submodule (Experimental)

A selection of open source 3D loaders have been ported to a new submodule Initial focus is on point cloud loaders (PLY, LAZ, PCD), although a geospatial loader (KML) is also included. In addition it contains both read and write support for GLB (the glTF binary container format).

Transform Class now supports Shader Modules

The Transform class now accepts shader module parameters (such as modules, dependencies and inject, see assembleShaders), enabling the use of shader modules in transform feedback operations. is now using the ocular document generator to build its website, which among other things enables search.

Version 6.0

Date: July 18, 2018

A major release that as always focuses on WebGL performance and code size optimizations, better support for shader/GLSL programming, improved documentation and API cleanup.

Attribute Management Optimizations

VertexArray objects are now used for all attribute management in, resulting in improved performance and a simpler, more consistent API. The Program and Model class APIs have been updated to use VertexArray.

Buffer Memory Optimizations

The Buffer class no longer holds on to the complete JavaScript typed arrays used during initialization. This can lead to significant memory savings in apps that use multiple large GPU buffers initialized from typed arrays. Also for convenience a new method getElementCount is added that returns number elements based on its size and type.

Transform Feedback Improvements

A new method Model.transform makes it easier to run basic transform feedback operations, when the full power of the new Transform class (see below) is not needed.

Transform class (WebGL 2)

Transform is now an officially supported class. This new class provides an easy-to-use interface to Transform Feedback. This class hides complexity by internally creating and managing the supporing WebGL objects that are necessary to perform Transform Feedback operations.

GLSL Transpilation

The shader assembler now transforms shader code to the GLSL version specified by the top-level shader. GLSL 3.00 ES shader code is transparently transformed into GLSL 1.00 ES compatible code when needed, and vice versa. This allows application to write shader code in the modern GLSL version available (3.00 ES) and still run it under WebGL 1 - Shader "transpilation" will automatically convert shader module source code syntax to the target version (assuming that no WebGL 2 only features were used).

Shader Code Injection

A new shader injection system allows applications to inject additional code into existing shaders. In many cases, this can avoid the need to copy (or "fork") large and complicated existing shaders just to add a few lines of code.

Shader injection can be used to "inject" new shader modules into an existing shader. Adding a shader module to the modules list automatically "prepends" the shader module functions to the beginning of your main shader code, but using a shader module still typically requires adding one or two lines of code each to the main functions in the vertex and fragment shaders. In many cases, the new shader injection feature allows this be done without copying the original shaders.

Shader Modules now support GLSL 3.00 ES

All shader modules are now written in GLSL 3.00 syntax, and leverage the new GLSL transpilation feature to be compatible with both GLSL 3.00 ES and GLSL 1.00 ES main shaders. Care is taken to avoid using GLSL 3.00 specific features whenever possible, and exceptions will be clearly documented.

Developer's Guide now has a more extensive Developer's Guide covering more areas of the API, including a new developer guide for shader programming, with sections about writing shaders and the shader module system. Content includes:

  • Guidelines for writing shaders that work in both GLSL 3.00 ES and GLSL 1.00 ES
  • A new GLSL language reference page describing both GLSL 3.00 ES and GLSL 1.00 ES (as well as what has changed between them) in a single place.

Being a major release, in v6.0 we took the opportunity to clean up the API.

Removal of Deprecated/Unused Methods

To keep reducing application bundle size, a number of methods have been removed from the API. Methods that were deprecated in previous releases have now been removed, and in additional a number of rarely used methods have also been dropped (in most cases, the dropped functionality is still accessible using raw WebGL calls).

Renamed Methods

In a few cases, methods have been renamed after API Audits, usually to improve API consistency. The details are listed in the Upgrade Guide. In most cases, running your pre-v6 application on v6 should generate messages in the console when old method calls are encountered, and you should be able to quickly address any changes one-by-one by referring to the Upgrade Guide.

Version 5.3

Date: June 1, 2018

A minor release with bug fixes and internal improvements.

Version 5.2

Date: Apr 24, 2018

Transform class (WebGL 2, Experimental)

The new experimental Transform class provides an easy-to-use interface to perform Transform Feedback operations.

Pixel Readback to GPU Buffers (WebGL 2) - A new method Framebuffer.readPixelsToBuffer is added to asynchronously read pixel data into a Buffer object. This allows applications to reduce the CPU-GPU sync time by postponing transfer of data or to completely avoid GPU-CPU sync by using the pixel data in the GPU Buffer object directly as data source for another GPU draw or transform feedback operation.

Bundle Size Reduction

The impact of importing on production application bundle sizes has been reduced, in particular when using webpack 4 with appropriate configuration. A new article about bundling and tree shaking has been added to the Developer Guide, providing in-depth information and guidance on what numbers to expect.

Running in Node.js

Running of under Node.js is now easier than ever. v5.2 automatically loads headless-gl if installed on the system, avoiding the need for the app to import special files or add other conditional logic. See Using with Node and the Upgrade Guide.

Debug Mode Changes

To further reduce production application bundle sizes, no longer support WebGL debug contexts by default, as this requires including the Khronos WebGLDeveloperTools into the bundle. WebGL debug contexts are still available, but needs to be explicitly enabled. To understand how to use WebGL debug contexts in v5.2, please refer to the article on Debugging and the Upgrade Guide.


All examples have been updated to use webpack 4

Version 5.1

A smaller release with improvements to TransformFeedback support.

Date: Feb 15, 2018

TransformFeedback Class

Two improvements Performing Transform Feedback operations has gotten easier, mainly in the following two ways:

TransformFeedback instances can now be supplied directly to Model.draw and feedback will begin and end during that draw call. Thus it is no longer necessary to work directly with the Program class to use transform feedback.

Program now build a varyingMap on creation depending on varyings array and drawMode. This varyingMap can be passed to TransformFeedback.bindBuffers() enabling buffers to be indexed by the name of the "varying" instead of using an index.

For more details check TransformFeedback and Model documentation.

Version 5.0

Date: Dec 22, 2017

A smaller release with several new examples and some under the hood changes to improve performance.


Additional examples have been ported to the v5 API.

  • Lesson 10
  • Lesson 11
  • Lesson 12
  • Lesson 13

Model Class

  • Model.draw now supports a moduleSettings parameters to update shader module settings.
  • Model.render now supports attributes and samplers arguments to be used for drawing.

Framebuffer Binding Management

In v4 we added WebGL state management which automatically tracks all WebGL state settings. In this release we extended this feature to support framebuffer bindings. When restoring context settings, the previous framebuffer binding will also be restored.

WebGL 2 Improvements

Improvements in particular to the Buffer, TransformFeedback and Framebuffer classes based on use in applications.

Shader Modules

  • fp64 - fp64 module works under more platforms/GPUs/drivers
  • picking shader module is moved from to and has been enhanced to also support object highlighting.

Version 4.0

Release date: July 27th, 2017

A major release that brings full WebGL 2 support to, as well as adding support for GL state management and a new shader module system.

Full WebGL 2 Support now exposes the complete WebGL 2 APIs:

  • New classes expose all the new WebGL 2 objects (Query, Texture3D, and TransformFeedback), together with a new UniformBufferLayout helper class to make uniform buffers easy to use.
  • Other existing WebGL classes with new functionalites under WebGL 2 have been updated.
  • Add new WebGL 2 texture formats and types support, including floating point textures, and multiple render targets.

WebGL Capability Management provides a single unified WebGL 2-style API across WebGL 2, WebGL 1 and WebGL extensions, and provides a simple mechanisms for querying what capabilities are available. This simplifies building apps that run on both WebGL 1 and WebGL 2, seamlessly allowing applications to leverage WebGL extensions when available.

WebGL State Management

In this version, a new WebGL state management is implemented to help address one of the weak spots of the stateful WebGL API:

  • can track certain WebGL context state changes so the app could easily set and reset WebGL states for certain operations.
  • also has a host-side WebGL state caching system that records certain WebGL states so that expansive queries into the GPU or underlying OpenGL driver won't be necessary.

shadertools - A New Shader Module System

  • The new, optional, shadertools module with the assembleShaders function system allows shader code to be broken into composable pieces.

  • A new ShaderCache class is provided to ensure that identical shaders are only compiled once and no unnecessary examination and/or checks are done on already compiled WebGL shader and program objects, which significantly accelerates app start up under some occasions.

Documentation Improvements

Complete rewrite of's documentation. New structure and contents for every classes provided, featured on a new website with links to other frameworks in Uber's visualization framework suite, such as and react-map-gl.

Code Size Improvements

Significant reduction in the size of distributed library

  • Code Size - is continuously being tuned for code size.
  • Deprecated Code Removed - Removal of deprecated features to help reduce library size.
  • Tree Shaking support - special care have been taken to avoid so called "side effects" that defeat dependency analysis during tree shaking).

Version 3.0

Release Date: March 15, 2017

A smaller release mainly intended to align the code base with the big v4 release.


  • Examples converted to ES6 to better showcase the API.

Debug Support

  • Now uses WEBGL_debug_shaders extension when available to log translated shader source code.
  • Performance queries, using EXT_disjoint_timer_query and EXT_disjoint_timer_query_webgl2 to provide timings.

New AnimationFrame class

  • Wraps requestAnimationFrame on browser and Node.js
  • Supports initialization promises (wait for HTML body (canvas) to load, wait for texture images to load, etc).
  • Supplies common uniforms to the frame render function: width, height, aspect, tick, time etc.

Smaller changes

  • Fix glTypeToArray to use Uint8ClampedArrays by default
  • Add CORS setting to allow loading image from a different domain

New gl-matrix based math library

  • Optional library: All math operations directly accept JavaScript arrays
  • Math classes are subclasses of JavaScript arrays (i.e. not x,y,z objects) and can thus be used interchangeably with arrays.
  • Relies on gl-matrix for computations.
  • Adds optional error checking.
  • Offers more control over details like printing precision etc.

Library Size

  • Reorganized to only export a minimal surface of functions/classes.
  • Tree-shaking support (package.json module keyword and dist-es6 distribution)
  • Significant reduction of module dependencies.

Experimental APIs

  • shader-modules, shader-tools, shaders shader module system added to /experimental
  • probe moved to /experimental


  • Old math lib deprecated.
  • FBO class deprecated (use Framebuffer directly).
  • Camera class deprecated, use math library directly.
  • Scene class deprecated, for effects use - TBD

Internal improvements

  • Replace wildcard exports with named exports in index.js
  • ES6 Conformant code base: stage-2 extensions removed
  • Webpack based build
  • Multiple examples now work standalone
  • Experimental tree-shaking support: dist and dist-es6 directories
  • Dependency removal, including removal of autobind-decorator dependency
  • Changed precommit hook from husky to pre-commit

Breaking Changes

  • BREAKING CHANGE: Move node IO (loadImage etc) out of main src tree and into packages. This allows to drop a number of big dependencies. The node IO code may be published as a separate module later.

Version 2.0

Release Date: July 05, 2016 (evolved through a number of minor releases)

Theme: A bigger official release, a major API refactoring that introduced the WebGL classes that are now a characteristic aspect of the API.

Major Features

  • CHANGE: Removes glslify as a dependency, apps that depend on glslify must add it to their own package.json.


  • Support EXT_disjoint_timer_query.

Debug Support

  • Built-in attribute/uniform logging
  • GLSL shader compiler error handling

Linux support

  • Add missing call to getAttribLocation.

New gl-matrix based math classes

  • Move old math lib to deprecated folder.
  • Move FBO to deprecated folder.
  • Examples converted to ES6. AnimationFrame class updates.
  • Add back persistence example
  • WebGL type and constant cleanup
  • Fix glTypeToArray and use clamped arrays by default

TimerQuery, WebGL Extension doc, fix crash on Travis CI

  • Support EXT_disjoint_timer_query
  • Document use of WebGL extensions.
  • Fix: context creation crash when WEBGL_debug_info extension was undefined

Debug log improvements, import fix

  • Debug logs now print unused attributes more compactly, number formatting improved.

Add ability to import luma without io

  • import "" will import luma without io functions
  • import "" will import luma io functions only
  • omitting io functions significantly reduces dependencies
  • Makes the luma object available in console for debugging.
  • Some polish on luma's built-in attribute/uniform logging


  • Ensure does not fail under node until createGLContext is called.
  • Program.render() now takes a map of uniforms, reducing need to "set" uniforms before render.
  • New experimental Renderer class - requestAnimationFrame replacement.
  • Improvement/fixes to examples

Node.js support

  • Ensure does not fail under node until createGLContext is called.

luma global initialization

  • Makes the luma object available in console for debugging.
  • Makes optional headless support more reliable.

Headless support

  • Removed gl (headless-gl) dependency, to simplify build and setup for applications that don't use headless-gl.
  • import '' and npm install gl to get headless integration.

Improve change detection

  • Redraw flag management improvements

Decoupled headless-gl dependency

  • It is now necessary to import through to get headless integration. When using the basic import, the app no longer needs to have gl as a dependency. This should simplify build and setup for applications that don't use headless-gl.

Improve change detection

  • Redraw flag management improvements
  • New experimental Renderer class - requestAnimationFrame replacement.

Version 1.0

Release Date: 2016

Theme: A smaller, mostly internal version that was the starting point for development.

Major Features

  • Initial ES6 Port from PhiloGL