feat: make wind rendering and backend switching WebGPU-portable - #702
Conversation
CoverageStmts: 51.00% ▼-0.03% | Branch: 42.11% | Funcs: 49.15% ▼-0.06% | Lines: 51.11% ▼-0.03%
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d208535de9
ℹ️ 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".
| varyings.position = projected.clipPosition; | ||
| varyings.color = vec4<f32>( | ||
| windParticlePoint.color.rgb, | ||
| windParticlePoint.color.a * fadeIn * fadeOut * layer.opacity | ||
| ); |
There was a problem hiding this comment.
Expand WebGPU particles to honor pointRadiusPixels
On WebGPU, this shader emits only one clip-space position for each point-list vertex, whose rasterized size is fixed at one pixel; it never consumes windParticlePoint.pointSize. Consequently, every pointRadiusPixels value—including the documented default radius of 1.6—is ignored and particle heads render as one-pixel squares rather than the requested circular size. The WebGPU path needs to expand each particle into screen-space quad geometry, or use an equivalent size-aware primitive.
Useful? React with 👍 / 👎.
Summary
Follow up on #699 and the deck.gl/luma.gl 9.4 alpha upgrade by making the historical wind scene and adjacent community layers render portably on WebGPU without regressing the merged million-particle showcase.
Wind and GPU rendering
WindLayerarrows andDelaunayCoverLayerstation surfaces.TerrainLayersupport.Device switching and portable scenes
Validation
yarn build— complete workspace package/type/declaration build.yarn test— 168 files, 1,417 passing tests, nine existing skips.DECK_GL_COMMUNITY_SOFTWARE_WEBGPU=true yarn vitest run --project headless modules/geo-layers/test/wind-layer/wind-layers.browser.spec.ts modules/infovis-layers/test/fast-text-layer.browser.spec.ts modules/layers/test/webgpu-layers.browser.spec.ts— seven Chromium WebGL2/WebGPU tests, including native WebGPU error validation and 4,096 GPU-resident wind particles.yarn vitest run --project examples examples/geo-layers/wind/wind-device-tabs.spec.ts examples/geo-layers/wind/wind-terrain.spec.ts— five focused showcase tests.yarn workspace wind-layer-example build— standalone wind production bundle.cd website && yarn build— complete production documentation/website build.yarn lint-fixand the repository's standard commit hooks.