Skip to content

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jul 7, 2025

  • initial implementation of GSplatManager, managing all splats. It only implements a temporary API by passing splats to a constructor, that will be replaced.
  • gsplat resorces can generate initial LOD at runtime. Only implemented for uncompressed splats, other splats used a single LOD (so no LOD for now). A better solution will be done.
  • work buffer stores all active splats in the scene, allowing global sorting. Only splats used by active LOD as used, which adds support for LOD.
  • some small refactoring of existing gsplat shader chunks, to allow their more flexible use. New shaders use those to implement copy of splats of various formats to the work buffer and also their rendering from the work buffer.
  • simple hidden example to test the functionality and temporary API. Note that the main uncompressed version of the church.ply is excluded due to its size.
  • works on WebGL and WebGPU

All this is subject to much improvements.

Screenshot 2025-07-07 at 15 13 20

@mvaligursky mvaligursky self-assigned this Jul 7, 2025
@mvaligursky mvaligursky added enhancement Request for a new feature area: graphics Graphics related issue labels Jul 7, 2025
@mvaligursky mvaligursky requested a review from a team July 7, 2025 14:26
@Maksims
Copy link
Collaborator

Maksims commented Jul 8, 2025

This is a huge step forward for GSplats! 🙏
Are LoDs configurable?

@mvaligursky
Copy link
Contributor Author

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.

Copy link
Contributor

@willeastcott willeastcott left a 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.

@mvaligursky
Copy link
Contributor Author

This is a huge step forward for GSplats! 🙏 Are LoDs configurable?

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.

Martin Valigursky added 2 commits July 21, 2025 16:23
Copy link
Contributor

@Copilot 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

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

@willeastcott willeastcott self-requested a review July 25, 2025 11:03
*
* @ignore
*/
class GSplatManager {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@mvaligursky mvaligursky merged commit 2cf00d0 into main Jul 25, 2025
7 checks passed
@mvaligursky mvaligursky deleted the mv-unified-splats-initial branch July 25, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement Request for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants