Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.1 whats-new & upgrade guide #9298

Merged
merged 13 commits into from
Jan 8, 2025
22 changes: 22 additions & 0 deletions docs/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

## Upgrading to v9.1

### Uniform buffer objects
felixpalmer marked this conversation as resolved.
Show resolved Hide resolved

All shaders that use global uniform defitions need to be migrated to Uniform Buffer Objects and the shader references updated, for example:

felixpalmer marked this conversation as resolved.
Show resolved Hide resolved
```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 uniforms defined in the UBO block. See [layerUniforms](https://github.com/visgl/deck.gl/blob/master/modules/core/src/shaderlib/misc/layer-uniforms.ts) for an example.
felixpalmer marked this conversation as resolved.
Show resolved Hide resolved

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))

### User input handling

- The main gesture recognition library, [mjolnir.js](https://visgl.github.io/mjolnir.js), is upgraded to v3.0. Hammer.js is no longer an (indirect) dependency, due to its lack of maintenance and various issues with SSR and test environments.
Expand Down
40 changes: 37 additions & 3 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ 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)

<table style={{border: 0}} align="center">
<tbody>
<tr>
<td>
<img style={{maxHeight:200}} src="https://www.w3.org/2023/02/webgpu-logos/webgpu-notext.svg" />
<p><i>WebGPU readiness</i></p>
</td>
<td>
<img style={{maxHeight:200}} src="https://github.com/user-attachments/assets/a3cc7c70-10a5-40c1-a5a8-d5d8b2d165ba" />
<p><i>Aggregation Layers</i></p>
</td>
<td>
<img style={{maxHeight:200}} src="https://github.com/user-attachments/assets/e522d961-600a-4405-9f09-c247b42f7e62" />
<p><i>Maplibre Globe View</i></p>
</td>
<td>
<img style={{maxHeight:200}} src="https://github.com/visgl/deck.gl/assets/453755/f1a10ffd-d403-4ea5-958d-3bc8fea412fe" />
<p><i>React Widgets</i></p>
</td>
</tr>
</tbody>
</table>


### WebGPU readiness

- luma.gl v9.1
- All layers migrated to UBO
All layers have been migrated to UBO, which is a necessary step in order to support WebGL & WebGPU. luma.gl has been updated to v9.1. For most users this change should be transparent, but custom layers that add `uniforms` will [need to be migrated](./upgrade-guide.md).
felixpalmer marked this conversation as resolved.
Show resolved Hide resolved

### Aggregation layers upgrade

Expand All @@ -26,6 +49,17 @@ Highlights:

See [upgrade guide](./upgrade-guide.md) for more details.


### Maplibre Globe View
felixpalmer marked this conversation as resolved.
Show resolved Hide resolved

MapLibre v5 recently launched a [globe view](https://github.com/maplibre/maplibre-gl-js/issues/307), and in collaboration with the MapLibre team, we have add support for seamlessly integrating deck.gl layers with the globe using the existing [GlobeView](./api-reference/core/globe-view). The integration works for all three [Intergration Modes](./developer-guide/base-maps/using-with-maplibre#integration-modes).


### React Widgets

deck.gl v9.0 added support for widgets, with v9.1 they can now be defined in React. A major benefit is the ablility to define custom widgets with UI built in React.


## deck.gl v9.0

Release date: March 21, 2024
Expand Down
Loading