Skip to content

feat(mesh-layers): port ScenegraphLayer to WebGPU#10477

Open
ibgreen-openai wants to merge 1 commit into
codex/scenegraph-example-local-datafrom
codex/webgpu-scenegraph-layer-port
Open

feat(mesh-layers): port ScenegraphLayer to WebGPU#10477
ibgreen-openai wants to merge 1 commit into
codex/scenegraph-example-local-datafrom
codex/webgpu-scenegraph-layer-port

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

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

  • Add WGSL ScenegraphLayer rendering with instance picking, layer opacity, WebGPU depth parameters, and transition guards.
  • Add a Scenegraph-specific WebGPU PBR adapter for glTF base-color textures and PBR bindings.
  • Keep the existing GLSL flat/PBR selection on WebGL; WebGPU-only paths are gated on the active device.
  • Expose device to the image-based-lighting callback and deprecate the legacy gl callback field.
  • Enable the website device tabs and pass the selected device through to the example.
  • Mark ScenegraphLayer as WebGPU-supported in the docs.

Website example

Example WebGL2 WebGPU Notes
ScenegraphLayer Renders the bundled flight snapshot from #10476; live OpenSky data remains best-effort.

Validation

  • yarn build
  • yarn lint (passes with existing repository warnings only)
  • yarn test-headless test/modules/mesh-layers/scenegraph-layer.spec.ts
  • yarn test-website

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review July 23, 2026 22:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants