feat(mesh-layers): port ScenegraphLayer to WebGPU#10477
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f9ff65ce4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #endif | ||
|
|
||
| fragColor.a *= layer.opacity; | ||
| return deckgl_premultiplied_alpha(fragColor); |
There was a problem hiding this comment.
Emit instance IDs during WebGPU picking
When a WebGPU picking pass sets picking.isActive, this fragment still returns the shaded material color. Although the vertex shader calculates geometry.pickingColor, it is never carried through FragmentInputs or selected in fragmentMain, unlike the other WGSL layer shaders. Consequently, pickObjectAsync, hover tooltips, and auto-highlighting on a pickable ScenegraphLayer decode arbitrary material RGB values instead of the instance index; pass the picking color as a varying and emit it during picking.
Useful? React with 👍 / 👎.
Goal
Port ScenegraphLayer to WebGPU while keeping the WebGL path close to master.
This PR is stacked on #10476, which contains only the example data-source fallback. The diff here is limited to WebGPU layer support, device wiring, and support docs.
Changes
deviceto the image-based-lighting callback and deprecate the legacyglcallback field.Website example
Validation
yarn buildyarn lint(passes with existing repository warnings only)yarn test-headless test/modules/mesh-layers/scenegraph-layer.spec.tsyarn test-website