Skip to content

Remove STORAGE_ORDER shader define#8488

Merged
slimbuck merged 2 commits intoplaycanvas:mainfrom
slimbuck:storage-dev
Feb 27, 2026
Merged

Remove STORAGE_ORDER shader define#8488
slimbuck merged 2 commits intoplaycanvas:mainfrom
slimbuck:storage-dev

Conversation

@slimbuck
Copy link
Member

Followup to #8487.

The STORAGE_ORDER shader define was used to branch between a storage buffer and a texture-based fallback for splat order data in the WGSL shader. Since WGSL is only used under WebGPU, and WebGPU always uses a storage buffer for order data, the texture fallback was dead code.

Changes

  • Remove #ifdef STORAGE_ORDER branching from the WGSL gsplatSource shader chunk, keeping only the var<storage, read> path
  • Remove setDefine('STORAGE_ORDER', ...) calls from GSplatInstance.setMaterialOrderData() and GSplatRenderer.configureMaterial()

No functional change — the GLSL (WebGL) path already uses texture-only order and was unaffected by this define.

@slimbuck slimbuck requested review from a team and Copilot February 27, 2026 12:15
@slimbuck slimbuck self-assigned this Feb 27, 2026
@slimbuck slimbuck added the area: graphics Graphics related issue label Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the now-dead STORAGE_ORDER WGSL shader define and associated branching for GSplat order data, aligning the WGSL/WebGPU path with the fact that WebGPU always supplies order data via a storage buffer.

Changes:

  • Simplify WGSL gsplatSource to always read splatOrder from var<storage, read> array<u32>.
  • Remove setDefine('STORAGE_ORDER', ...) from GSplat material configuration paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatSource.js Removes texture fallback and always reads order from storage buffer in WGSL.
src/scene/gsplat/gsplat-instance.js Stops setting STORAGE_ORDER define when binding order buffer/texture.
src/scene/gsplat-unified/gsplat-renderer.js Stops setting STORAGE_ORDER define during unified renderer material configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slimbuck slimbuck merged commit 28cdbbc into playcanvas:main Feb 27, 2026
6 of 8 checks passed
@slimbuck slimbuck deleted the storage-dev branch February 27, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants