Remove STORAGE_ORDER shader define#8488
Merged
slimbuck merged 2 commits intoplaycanvas:mainfrom Feb 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
gsplatSourceto always readsplatOrderfromvar<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.
mvaligursky
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #8487.
The
STORAGE_ORDERshader 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
#ifdef STORAGE_ORDERbranching from the WGSLgsplatSourceshader chunk, keeping only thevar<storage, read>pathsetDefine('STORAGE_ORDER', ...)calls fromGSplatInstance.setMaterialOrderData()andGSplatRenderer.configureMaterial()No functional change — the GLSL (WebGL) path already uses texture-only order and was unaffected by this define.