Skip to content

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

Open
ibgreen-openai wants to merge 3 commits 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 3 commits into
codex/scenegraph-example-local-datafrom
codex/webgpu-scenegraph-layer-port

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Goal

Port ScenegraphLayer to 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

  • Add WGSL scenegraph rendering with instance transforms, picking, opacity, and the necessary WebGPU depth/transition behavior.
  • Supply WGSL source and shared color modules unconditionally.
  • Add the Scenegraph-specific WGSL PBR adapter required by glTF material bindings.
  • Keep the existing WebGL PBR material and dummy shader module unchanged. The remaining PBR backend check is intentional: WebGL and WebGPU require different material implementations and cannot share this module safely.
  • Add device to the image-based-lighting callback and mark legacy gl as deprecated.
  • Enable the existing example only through static hasDeviceTabs = true; the shared example device plumbing is inherited from master.
  • Document ScenegraphLayer WebGPU support.

Website example

Example WebGPU Notes
ScenegraphLayer / Flight Tracker Supported Uses the reliable bundled snapshot from #10476; live OpenSky remains best-effort.

Validation

  • yarn build: passed for the combined WebGPU integration branch.
  • yarn lint and 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.
  • Chromium render coverage: the PathLayer, PolygonLayer, TextLayer, and ScenegraphLayer suites all passed.
  • The four GeoJSON text screenshot mismatches reproduce unchanged on the exact current master, including identical match percentages; they are not regressions introduced by this branch.

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

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 83.385%codex/webgpu-scenegraph-layer-port into codex/scenegraph-example-local-data. No base build found for codex/scenegraph-example-local-data.

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.

3 participants