Skip to content

Commit 1532a73

Browse files
docs: Minimal WebGPU user guide (#9716)
1 parent 93111b6 commit 1532a73

File tree

9 files changed

+61
-369
lines changed

9 files changed

+61
-369
lines changed

docs/developer-guide/webgpu.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# WebGPU
2+
3+
:::caution
4+
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+
new Deck({
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.
29+
30+
- [`PointCloudLayer`](https://deck.gl/examples/point-cloud-layer)
31+
- [`ScatterplotLayer`](https://deck.gl/examples/scatterplot-layer)
32+
33+
## Features
34+
35+
Apart from listing which layers have been ported, another aspect is what deck.gl features support WebGPU.
36+
37+
| Feature | Status | Comment |
38+
| --------------------- | ------ | --------------------------------------------------------------------------------------- |
39+
| 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.

docs/table-of-contents.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"developer-guide/tips-and-tricks",
4242
"developer-guide/building-apps",
4343
"developer-guide/debugging",
44-
"developer-guide/testing"
44+
"developer-guide/testing",
45+
"developer-guide/webgpu"
4546
]
4647
},
4748
{

docs/whats-new.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ This page contains highlights of each deck.gl release. Also check our [vis.gl bl
44

55
## deck.gl v9.2
66

7-
Target release date: Q2, 2025
7+
Target release date: July, 2025
8+
9+
### WebGPU Early Preview
10+
11+
A few deck.gl layers can now be run on WebGPU in the website, by selecting the `WebGPU` tab. See documentation about how to [test WebGPU support](./developer-guide/webgpu.md).
812

913
### Widgets
1014

test/apps/webgpu-scatterplot/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/apps/webgpu-scatterplot/app.tsx

Lines changed: 0 additions & 108 deletions
This file was deleted.

test/apps/webgpu-scatterplot/index.html

Lines changed: 0 additions & 25 deletions
This file was deleted.

test/apps/webgpu-scatterplot/package.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)