Skip to content

feat(layers): port TextLayer glyph rendering to WebGPU#10473

Open
ibgreen-openai wants to merge 1 commit into
masterfrom
codex/webgpu-text-layer
Open

feat(layers): port TextLayer glyph rendering to WebGPU#10473
ibgreen-openai wants to merge 1 commit into
masterfrom
codex/webgpu-text-layer

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goal

Port the core TextLayer glyph rendering path to WebGPU as a small, reviewable extraction from #10450.

Changes

  • Add a WGSL shader for MultiIconLayer, the glyph-rendering sublayer used by TextLayer.
  • Select the WGSL source only when the active device is WebGPU; WebGL continues to use the existing GLSL shader path.
  • Pack the TextLayer-specific row index and clip-rect attributes into a WebGPU buffer group.
  • Add WebGL2/WebGPU tabs to the website TextLayer example and pass the selected device through to DeckGL.
  • Skip CollisionFilterExtension only for WebGPU because that extension is not ported yet; WebGL keeps the existing collision-filter behavior.

Website examples

Layer / feature Example WebGPU status Notes
TextLayer glyph rendering World Cities by Population ✅ Works CollisionFilterExtension is skipped on WebGPU only.

TextBackgroundLayer and the clipping/treemap example are intentionally left out of this PR. During extraction, that optional path rendered blank in WebGPU without console errors, so it needs a separate focused follow-up instead of broadening this low-risk port.

Why the WebGL path is low risk

  • MultiIconLayer returns the same GLSL shader object on WebGL; the WGSL source is attached only on WebGPU.
  • bufferGroup metadata is consumed only by the WebGPU AttributeBufferGroups path.
  • The example keeps CollisionFilterExtension unchanged on WebGL.

Validation

  • yarn build
  • yarn lint (passes with the repository's existing 70 module warnings and 18 example warnings)
  • yarn test-headless test/modules/layers/text-layer/text-layer.spec.ts
  • yarn test-website
  • Manually loaded /examples/text-layer with WebGPU selected: glyphs render and the runtime console has no errors.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 83.355% (-0.02%) from 83.372% — codex/webgpu-text-layer into master

@ibgreen
ibgreen marked this pull request as ready for review July 23, 2026 19:04
@ibgreen-openai ibgreen-openai mentioned this pull request Jul 23, 2026
26 tasks
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