-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Initial implementation of unified gsplat rendering #7825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a huge step forward for GSplats! 🙏 |
src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplat-copy-to-workbuffer.js
Show resolved
Hide resolved
There is a lot of code that is currently commented out, but will be refactored to a useable form in the near future. I'd prefer not to remove it in order to simplify my life. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with some comments, but I would suggest that @slimbuck's review is required before merging.
There will be public API with a way to configure this in the future. At this stage it's just a tech drop without any public API. Still very much WIP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a unified gsplat rendering system that enables efficient management and rendering of multiple gaussian splats through a centralized work buffer approach. The key changes include a new GSplatManager that coordinates splat rendering, LOD support for better performance at distance, and shader restructuring for flexibility.
- Implements GSplatManager with unified work buffer rendering for all active splats
- Adds runtime LOD generation and management with distance-based level selection
- Refactors gsplat shader chunks into reusable components for different data sources
Reviewed Changes
Copilot reviewed 32 out of 34 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
src/scene/shader-lib//collections/shader-chunks-.js | Adds new shader chunk exports for unified gsplat rendering |
src/scene/shader-lib//chunks/gsplat/vert/gsplat.js | New shader chunks for work buffer data access and modular structure definitions |
src/scene/shader-lib/*/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js | Fragment shader for copying splats to work buffer with LOD remapping |
src/scene/gsplat/unified/*.js | Core unified rendering system implementation including manager, work buffer, sorting, and LOD |
src/scene/gsplat/gsplat-resource*.js | Enhanced with LOD generation and data reordering capabilities |
examples/src/examples/gaussian-splatting/lod.example.mjs | Hidden example demonstrating the new unified API |
src/scene/shader-lib/glsl/chunks/gsplat/vert/gsplatWorkBuffer.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
* | ||
* @ignore | ||
*/ | ||
class GSplatManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this will be moved to GSplatComponentSystem
at some point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the follow up PR I have GSplatDirector which manages GSplatManager instances (per camera / layer) as needed.
GSplatManager stays as is.
All this is subject to much improvements.