You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ PRs and bug reports are welcome, and we are actively looking for new maintainers
10
10
The **master** branch is the active development branch.
11
11
12
12
Building deck.gl locally from the source requires node.js `>=14`. Further limitations on the Node version may be imposed by [puppeteer](https://github.com/puppeteer/puppeteer#usage) and [headless-gl](https://github.com/stackgl/headless-gl#supported-platforms-and-nodejs-versions).
13
-
We use [yarn](https://yarnpkg.com/en/docs/install) to manage the dependencies of deck.gl.
13
+
We use [yarn](https://yarnpkg.com/en/docs/install) to manage the dependencies of deck.gl, and [volta](https://docs.volta.sh/guide/getting-started) to manage the Node and yarn version.
14
14
15
15
```bash
16
16
git checkout master
@@ -20,6 +20,15 @@ yarn test
20
20
21
21
See [additional instructions](#troubleshooting) for Windows, Linux and Apple M1.
Clears the contents (pixels) of the viewport. The value of the `clear` prop is passed as an argument to luma.gl's `clear` function. If `true` clears colorand depth buffers. If an object, behaviour is controlled by the following fields:
86
+
Clears the contents (pixels) of the viewport. If `true` clears color, depth, and stencil buffers. Behavior is controlled with the `clearColor`, `clearDepth`, and `clearStencil` properties.
87
87
88
-
*`color` (boolean or Array) - if not `false`, clears all active color buffers with either the provided color or the currently set clear color.
89
-
*`depth` (boolean) - if `true`, clears the depth buffer.
90
-
*`stencil` (boolean) - if `true` clears the stencil buffer.
91
-
92
-
Note that deck.gl always clears the screen before each render, and clearing, while cheap, is not totally free. This means that viewports should only specify the `clear` property if they need additional clearing, e.g. because they are rendering on top of another viewport, or want to have a different background color etc.
88
+
Note that deck.gl always clears the screen before each render, and clearing, while cheap, is not totally free. This means that viewports should only clear the viewport if they need additional clearing, e.g. because they are rendering on top of another viewport, or want to have a different background color etc.
Specifies the color to clear the viewport with, as an array of four numbers `[r, g, b, a?]`. Each channel should be an integer between 0 and 255. For example, `[255, 0, 0, 255]` for opaque red. If `clearColor` is `false`, the depth buffer will not be cleared. If `clear` is set to `false`, this property will be ignored.
Specifies the depth buffer value to clear the viewport with, as number between `0.0` and `1.0`. If `clearDepth` is `false`, the depth buffer will not be cleared. If `clear` is set to `false`, this property will be ignored.
Specifies the stencil buffer value to clear the viewport with, as number between `0` and `255`. If `clearStencil` is `false`, the depth buffer will not be cleared. If `clear` is set to `false`, this property will be ignored.
107
+
108
+
Default `0` (clear).
109
+
110
+
**Examples:**
111
+
112
+
* Clearing to a solid color: `new View({clear: true, clearColor: [80, 120, 200, 255]})`
113
+
* Clearing color and stencil but not depth: `new View({clear: true, clearColor: [50, 50, 50, 255], clearDepth: false})`
114
+
* No clearing at all: `new View({})` or `new View({clear: false})`
Copy file name to clipboardExpand all lines: docs/api-reference/geo-layers/terrain-layer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ import {TerrainLayerDemo} from '@site/src/doc-demos/geo-layers';
6
6
7
7
The `TerrainLayer` reconstructs mesh surfaces from height map images, e.g. [Mapzen Terrain Tiles](https://github.com/tilezen/joerd/blob/master/docs/formats.md), which encodes elevation into R,G,B values.
8
8
9
-
When `elevationData` is supplied with a URL template, i.e. a string containing `'{x}'` and `'{y}'`, it loads terrain tiles on demand using a `TileLayer` and renders a mesh for each tile. If `elevationData` is an absolute URL, a single mesh is used, and the `bounds` prop is required to position it into the world space.
9
+
When `elevationData` is supplied with a URL template, i.e. a string containing `'{x}'` and `'{y}'` (or `'{-y}'` for TMS tiles), it loads terrain tiles on demand using a `TileLayer` and renders a mesh for each tile. If `elevationData` is an absolute URL, a single mesh is used, and the `bounds` prop is required to position it into the world space.
Copy file name to clipboardExpand all lines: docs/developer-guide/custom-layers/writing-shaders.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,12 @@
3
3
A shader library facilitates creating shaders that work seamlessly with deck.gl. The `modules` parameter passed to the [Model](https://github.com/visgl/luma.gl/blob/8.0-release/docs/api-reference/engine/model.md) class can dynamically include parts from this library into your own GLSL code:
modules: [picking, project32, gouraudLighting] // list of optional module names
11
+
modules: [picking, project32, gouraudMaterial] // list of optional module names
12
12
});
13
13
```
14
14
@@ -34,8 +34,8 @@ The `project` module also has two extensions, [project32](../../api-reference/co
34
34
35
35
A simple lighting package is provided in deck.gl, supporting a single directional light in addition to ambient light. Turning on lighting requires normals to be provided for each vertex. There are two flavors:
36
36
37
-
-[gouraudLighting] - for lighting calculated in the vertex shader
38
-
-[phongLighting] - for lighting calculated in the fragment shader
37
+
-[gouraudMaterial] - for lighting calculated in the vertex shader
38
+
-[phongMaterial] - for lighting calculated in the fragment shader
WebGPU support in deck.gl v9 is a work in progress and is not production ready. At this stage, it is aimed at early adopters who wants to try out the new technology, contributors interested in supporting development, or general users that are curious to understand what to expect from future releases.
5
+
:::
6
+
7
+
deck.gl is gradually adding support for running on WebGPU. WebGPU support will materialize over successive releases, layer by layer and feature by feature.
8
+
9
+
## Enabling WebGPU
10
+
11
+
deck.gl needs to be set up to use a luma.gl device that uses the luma.gl `webgpuAdapter`.
12
+
13
+
One way to do this is to supply `deviceProps` to the Deck constructor:
14
+
15
+
```ts
16
+
import {webgpuAdapter} from'@luma.gl/webgpu`;
17
+
18
+
newDeck({
19
+
deviceProps: {
20
+
type: 'webgpu',
21
+
adapters: [webgpuAdapter]
22
+
}
23
+
});
24
+
```
25
+
26
+
## Layers
27
+
28
+
Layers will gradually be WebGPU enabled. Layers that support WebGPU can be tested in the deck.gl website, using the WebGPU tab.
| Views | 🚧 | Various view systems should work via the WGSL port of the `project module`.ß |
40
+
| Picking | ❌ | WebGPU pixel readout is asynchronous, requiring an overhaul of deck.gl's picking engine |
41
+
| Base Map overlays | ❌ | deck.gl needs to adopt pre-multiplied colors to enable transparency |
42
+
| Base Map interleaving | ❌ | At the moment no basemaps support WebGPU |
43
+
44
+
This is currently an incomplete list. Expect more detail in upcoming releases.
45
+
46
+
## Background
47
+
48
+
While the WebGPU support in deck.gl may look limited, under the hood, WebGPU enablement has been in progress for several years and a lot of work has been completed. In particular [luma.gl](https://luma.gl), the GPU framework powering deck.gl, has been rewritten and adopted a "WebGPU-first" design.
49
+
50
+
## Participating
51
+
52
+
If you want to contribute to deck.gl WebGPU development, or just follow along, we have a dedicated channel in our OpenJS / Open Visualization slack channel.
53
+
54
+
You can also check various release tracker tasks on GitHub.
0 commit comments