Visitar URL original
feat(mesh-layers): port SimpleMeshLayer to WebGPU by ibgreen-openai · Pull Request #10485 · visgl/deck.gl · GitHub
Skip to content

feat(mesh-layers): port SimpleMeshLayer to WebGPU - #10485

Merged
ibgreen merged 4 commits into
masterfrom
codex/webgpu-simple-mesh-layer
Aug 2, 2026
Merged

ibgreen merged 4 commits into
masterfrom
codex/webgpu-simple-mesh-layer

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Summary

Port SimpleMeshLayer to WebGPU as a small, independent change against master.

The existing WebGL vertex and fragment shaders, WebGL texture bindings, mesh transformations, and rendering behavior remain unchanged.

Changes

  • Add a native WGSL SimpleMeshLayer shader covering instanced mesh transforms, geographic and Cartesian projections, smooth and flat Phong shading, texture sampling, opacity, picking, and highlighting.
  • Extend the existing shader module with WebGPU uniform, texture, and sampler bindings while preserving its original GLSL uniform block.
  • Preserve the existing WebGL texture sampler and use the native WebGPU texture binding only on WebGPU.
  • Reuse the existing 100-Mini-Cooper mesh example as a dedicated website example with WebGL/WebGPU device tabs.
  • Exclude the unrelated SolidPolygon shadow plane and shadow effects only in WebGPU mode until that separate layer is ported. WebGL continues to render the original complete example unchanged.
  • Add a real GPU-backed test validating both textured and untextured mesh pipelines and checking WebGPU validation error scopes.
  • Mark SimpleMeshLayer as WebGPU-supported in the developer guide.

Website example

Layer / example Route WebGPU result
SimpleMeshLayer — Instanced 3D Mini Coopers /examples/simple-mesh-layer 100 independently positioned, oriented, colored, and lit 3D mesh instances.

WebGL compatibility

The existing GLSL shaders are unchanged. All existing SimpleMeshLayer golden images remain identical, including geographic, Cartesian, meter-offset, smooth-shading, and flat-shading cases.

Validation

  • yarn build
  • yarn lint
  • yarn test-headless test/modules/mesh-layers
  • yarn test-render test/render/test-cases/simple-mesh-layer.spec.ts — all 5 existing reference images pass.
  • yarn test-website
  • Actual WebGPU validation of textured and untextured mesh pipeline creation.
  • Browser verification of the new dedicated example with WebGPU selected.

@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: 55068e5431

ℹ️ 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".

@coveralls

coveralls commented Jul 25, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.071% (-0.006%) from 83.077% — codex/webgpu-simple-mesh-layer into master

Comment thread examples/website/mesh/app.jsx Resolved
@ibgreen
ibgreen force-pushed the codex/webgpu-simple-mesh-layer branch from 13560f3 to d0bc760 Compare August 1, 2026 18:11
@ibgreen
ibgreen merged commit 0df5504 into master Aug 2, 2026
3 checks passed
@ibgreen
ibgreen deleted the codex/webgpu-simple-mesh-layer branch August 2, 2026 17:49
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.

4 participants