Skip to content

refactor(gsplat): extract GSplatWorld from GSplatManager#8916

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-world-extraction
Jun 17, 2026
Merged

refactor(gsplat): extract GSplatWorld from GSplatManager#8916
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-world-extraction

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Splits GSplatManager's two unrelated responsibilities apart, as the first step toward letting the hybrid GPU-sort renderer share splat data across multiple renderers (e.g. a future shadow renderer).

Changes:

  • New internal GSplatWorld (src/scene/gsplat-unified/gsplat-world.js) owns the work buffer, versioned world states, allocation, octree/LOD evaluation, streaming, budget enforcement, and the work-buffer bake.
  • GSplatManager keeps the single renderer, the sorters, interval compaction, the projector, and per-camera cull/sort — and delegates the world responsibilities to its GSplatWorld.
  • The dependency is strictly one-way (manager → world): the manager reads world data through getters and drives mutation via explicit methods (update/bake/markSorted/onSorted/syncFormat/invalidate/reconcile). Results are written into caller-owned persistent objects to avoid per-frame allocation.
  • 1:1 ownership for now (each manager creates one world, no sharing yet); behaviour-preserving.
  • GSplatIntervalCompaction.invalidateUpload() added to replace a direct private-field poke from the manager.
  • LOD-cadence fix: the periodic (10-frame) LOD update now uses a latched request, so an update deferred by sorter back-pressure fires on the next available frame instead of being lost until the next cadence interval.

Performance:

  • No expected change for the steady state. The LOD-cadence latch makes a back-pressure-deferred LOD update fire up to ~10 frames sooner under load.

All GSplatWorld / GSplatManager members are internal (@ignore); no public API changes.

Split GSplatManager's two responsibilities apart. The new GSplatWorld owns the
work buffer, versioned world states, allocation, octree/LOD evaluation, streaming,
budget enforcement, and the work-buffer bake. GSplatManager keeps a single renderer,
the sorters, interval compaction, the projector, and per-camera cull/sort.

The dependency is strictly one-way (manager -> world): the manager reads world data
through getters and drives mutation via explicit methods (update/bake/markSorted/
onSorted/syncFormat/invalidate/reconcile), with results written into caller-owned
persistent objects to avoid per-frame allocation. Behaviour-preserving; 1:1 (each
manager owns one world, no sharing yet).

Also replace the LOD-cadence 'lose a tick' behaviour with a latched request, so a
periodic LOD update deferred by sorter back-pressure fires on the next available
frame instead of waiting another full cadence interval.

This is step one toward letting the hybrid GPU-sort renderer share splat data across
multiple renderers (e.g. a shadow renderer).
@mvaligursky mvaligursky self-assigned this Jun 17, 2026
@mvaligursky mvaligursky merged commit a40fdf9 into main Jun 17, 2026
9 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-world-extraction branch June 17, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant