GSplat Work Buffer Custom Streams Support#8396
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the GSplat unified rendering work buffer to support custom per-splat data streams. Users can now add extra texture streams to the work buffer format and use shader hooks to write and read custom data during rendering.
Changes:
- Refactored work buffer to use
GSplatFormatfor stream management, enabling dynamic addition of extra streams - Added support for custom stream declarations and generated
write{StreamName}()andload{StreamName}()shader functions - Modified shader chunks to support work buffer read functions and output declarations for MRT
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/scene/shader-lib/wgsl/collections/gsplat-chunks-wgsl.js |
Replaced gsplatWorkBufferVS with gsplatWorkBufferReadVS chunk |
src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatFormat.js |
Reorganized format declarations and moved #include directive |
src/scene/shader-lib/wgsl/chunks/gsplat/vert/gsplatCommon.js |
Reordered includes to ensure format declarations load before usage |
src/scene/shader-lib/wgsl/chunks/gsplat/vert/formats/workBufferRead.js |
Updated to initialize splatUV for generated load functions |
src/scene/shader-lib/wgsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js |
Changed to use module-scope output variable and generated write functions |
src/scene/shader-lib/glsl/collections/gsplat-chunks-glsl.js |
Replaced gsplatWorkBufferVS with gsplatWorkBufferReadVS chunk |
src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatFormat.js |
Reorganized format declarations and moved #include directive |
src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatCommon.js |
Reordered includes to ensure format declarations load before usage |
src/scene/shader-lib/glsl/chunks/gsplat/vert/formats/workBufferRead.js |
Updated to initialize splatUV for generated load functions, fixed trailing spaces |
src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js |
Changed to use generated write functions instead of direct fragment output |
src/scene/scene.js |
Updated GSplatParams instantiation to pass device parameter |
src/scene/gsplat/gsplat-streams.js |
Added getTexturesInOrder() and resize() methods for work buffer support |
src/scene/gsplat/gsplat-resource-base.js |
Updated getWorkBufferRenderInfo() signature to accept work buffer format |
src/scene/gsplat/gsplat-format.js |
Enhanced documentation for stream descriptors and format usage |
src/scene/gsplat-unified/gsplat-work-buffer.js |
Refactored to use GSplatStreams for texture management and support dynamic formats |
src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js |
Updated to pass work buffer format to render info |
src/scene/gsplat-unified/gsplat-sort-key-compute.js |
Changed to access textures via getTexture() method |
src/scene/gsplat-unified/gsplat-renderer.js |
Refactored to sync with work buffer format changes and bind textures dynamically |
src/scene/gsplat-unified/gsplat-params.js |
Added format descriptor initialization and public getter |
src/scene/gsplat-unified/gsplat-manager.js |
Updated work buffer instantiation to pass format parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…frame additional streams / shaders
slimbuck
approved these changes
Jan 23, 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.
Summary
Extends the GSplat unified rendering work buffer to support custom per-splat data streams. Users can add extra streams to the work buffer format and use shader hooks to write custom data during the copy-to-work-buffer pass and read it during rendering.
Features
app.scene.gsplat.formatviaaddExtraStreams()workBufferModifiershader chunks onGSplatComponentto write custom data using generatedwrite{StreamName}()functionsload{StreamName}()functions via existinggsplatModifyVSchunk onapp.scene.gsplat.material