Skip to content

chore(core): remove trivial WebGPU conditional checks in layers - #10479

Merged
ibgreen merged 1 commit into
masterfrom
codex/unconditional-shader-modules
Jul 24, 2026
Merged

ibgreen merged 1 commit into
masterfrom
codex/unconditional-shader-modules

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Goal

Remove trivial isWebGPU checks from shader setup so WebGPU layer ports can use the same getShaders() shape on both backends.

Changes

  • Document that the color shader module is intentionally WGSL-only and a no-op for GLSL assembly.
  • Always supply WGSL source alongside vs/fs; luma.gl selects the source for the active backend.
  • Always include the color module in ArcLayer, BitmapLayer, ColumnLayer, HexagonCellLayer, and ScreenGridCellLayer.
  • Leave real backend-specific branches such as buffer layouts, picking blend state, mipmaps, and constant attributes unchanged.

This follows the existing unconditional source/color pattern already used by IconLayer, ScatterplotLayer, and PointCloudLayer.

Impact

No intended rendering change. WebGL still assembles vs/fs, while WebGPU still assembles WGSL source. The color module has no GLSL source, uniforms, or injections.

Validation

  • yarn build
  • Full pre-commit lint/format and Node test gate
  • yarn vitest run test/render/test-cases/arc-layer.spec.ts test/render/test-cases/column-layer.spec.ts test/render/test-cases/hexagon-layer.spec.ts test/render/test-cases/screen-grid-layer.spec.ts --project render (23 passed)
  • yarn vitest run test/modules/layers/bitmap-layer.spec.ts --project headless (4 passed)

@ibgreen-openai ibgreen-openai changed the title refactor(core): make WebGPU shader props unconditional refactor(core): remove trivial WebGPU conditional checks in layers Jul 24, 2026
@ibgreen-openai ibgreen-openai changed the title refactor(core): remove trivial WebGPU conditional checks in layers chore(core): remove trivial WebGPU conditional checks in layers Jul 24, 2026
@ibgreen-openai
ibgreen-openai marked this pull request as ready for review July 24, 2026 13:44
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 83.39% — codex/unconditional-shader-modules into master. No base build found for master.

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