diff --git a/docs/upgrade-guide.md b/docs/upgrade-guide.md index a94ff0b7811..1079d605f8c 100644 --- a/docs/upgrade-guide.md +++ b/docs/upgrade-guide.md @@ -32,6 +32,30 @@ Breaking changes: - `PointLight.attenuation` was previously ignored. To retain old behavior, use the default (`[1, 0, 0]`). +### Uniform buffers + +GLSL shaders that take inputs via WebGL1-style uniforms need to be migrated to use uniform buffers instead. For example: + +```glsl +// Global uniform +uniform float opacity; + +// UBO +uniform layerUniforms { + uniform float opacity; +} layer; +``` + +The [ShaderModule](https://luma.gl/docs/api-reference/shadertools/shader-module) class is used to encapsulate and inject the uniforms, as well as providing using useful type checks. It maps (typed) props to bindings and uniforms defined in the UBO block, which [ShaderInputs](https://luma.gl/docs/api-reference/engine/shader-inputs) uses to update bindings and uniform buffers on the GPU. + +See [layerUniforms](https://github.com/visgl/deck.gl/blob/master/modules/core/src/shaderlib/misc/layer-uniforms.ts) for an example. + +Layers need to be modified: +- `getShaders()` needs to additionaly return the `ShaderModule` that defines the UBO +- Instead of calling `model.setUniforms` (or `model.setBindings`) use `model.shaderInputs.setProps` to update the UBO with props + +For more information see [presentation](https://docs.google.com/presentation/d/1OcjA_hdu6vEvL_nxm7ywnXZQbMr5eR4R_L-wcz6K0HI/) ([recording](https://www.youtube.com/watch?v=ei6scnRpNhU)) + ## Upgrading to v9.0 **Before you upgrade: known issues** diff --git a/docs/whats-new.md b/docs/whats-new.md index e0e5629e5cc..89b84498b47 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -4,12 +4,48 @@ This page contains highlights of each deck.gl release. Also check our [vis.gl bl ## deck.gl v9.1 -Release date: TBD (targeting September 2024) +Release date: TBD (targeting December 2024) -### WebGPU readiness + + + + + + + + + +
+ +

Maplibre Globe View

+
+ +

React Widgets

+
+ +

Aggregation Layers

+
+ +

WebGPU readiness

+
+ + +### Maplibre Globe View + +- The deck.gl [`GlobeView`](./api-reference/core/globe-view) now integrates seamlessly with the MapLibre v5 [globe view](https://maplibre.org/roadmap/globe-view/). +- The Maplibre globe view integration was done in close collaboration with the MapLibre team, and works for all three [Basemap Intergration Modes](./developer-guide/base-maps/using-with-maplibre#integration-modes). +- The deck.gl `GlobeView` is no longer considered experimental, and can now be imported without a leading underscore. -- luma.gl v9.1 -- All layers migrated to UBO +### React Widgets + +deck.gl v9.0 added support for widgets, with v9.1 users can now create React components with the same level of deep deck.gl integration. +- All the official deck.gl widgets can now be easily wrapped into React components with the new `useWidget` hook. +- Pre-wrapped React components for existing widget are available from the `@deck.gl/react` package. +- To try it out, check out our new [getting started example](https://github.com/visgl/deck.gl/tree/master/examples/get-started/react/widgets) for using widgets in React. + +### Widgets Developer Guide + +deck.gl v9.1 provides the ability to for applications to write React component that integrate with deck.gl using the widget interface. Learn how to write such React components with our new [Custom Widgets Developer Guide](./docs/developer-guide/custom-widgets). ### Aggregation layers upgrade @@ -26,6 +62,12 @@ Highlights: See [upgrade guide](./upgrade-guide.md) for more details. +### WebGPU readiness + +- luma.gl has been updated to v9.1 which focuses on improved WebGPU support. For details see [release notes](https://luma.gl/docs/whats-new#version-91-in-development) and [upgrade-guide](https://luma.gl/docs/upgrade-guide#upgrading-to-v91). +- As part of WebGPU readiness, all shader code in deck.gl v9.1 (layers and extensions) have been migrated to use uniform buffers instead of WebGL1 style uniforms. +- For most users this change should be transparent, but custom layers that add `uniforms` should [start migrating asap](./upgrade-guide.md) as WebGL1 style uniform support is being actively phased out. + ## deck.gl v9.0 Release date: March 21, 2024