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
ScenegraphLayerto WebGPU while preserving the existing WebGL and PBR rendering paths.This branch includes the landed AttributeManager buffer groups, unconditional WGSL shader/module setup (#10479), and shared website device plumbing (#10480).
Stacked on #10476, which independently makes the example reliable using a bundled flight-data snapshot.
Changes
sourceand shared color modules unconditionally.deviceto the image-based-lighting callback and mark legacyglas deprecated.static hasDeviceTabs = true; the shared example device plumbing is inherited frommaster.Website example
Validation
yarn build: passed for the combined WebGPU integration branch.yarn lintand the node test suite: passed; only existing repository warnings remain.yarn test-website: the full production website build passed; only existing dependency source-map warnings remain.master, including identical match percentages; they are not regressions introduced by this branch.