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