Skip to content

feat: Add Scene#gsplatCentersEnabled opt-out for gsplat CPU centers#8691

Merged
mvaligursky merged 1 commit intomainfrom
mv-gsplat-centers-enabled
May 6, 2026
Merged

feat: Add Scene#gsplatCentersEnabled opt-out for gsplat CPU centers#8691
mvaligursky merged 1 commit intomainfrom
mv-gsplat-centers-enabled

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented May 6, 2026

Adds an opt-out so loaded gsplat assets can omit the CPU-side centers buffer when only unified GPU sorting (or other paths that do not need it) is required, reducing memory for large SOG/PLY loads.

Changes:

  • New Scene#gsplatCentersEnabled (default true) with JSDoc; each parser load snapshots the flag before its first await and passes prepareCenters into resources.
  • GSplatResourceBase: _centers storage with centers accessor, optional prepareCenters in constructor, and hasCenters (non-null check without triggering container lazy centers).
  • File-backed resources forward options; SOG parsers skip prepareGpuData when centers are disabled at load.
  • GSplatContainer: lazy centers allocation via super(..., { prepareCenters: false }).
  • Unified GSplatManager: when CPU sorting is active, omit placements without centers; _worldStateDirty on renderer mode change; clearer warnOnce messages.
  • Non-unified GSplatInstance: gate on hasCenters, matching warning style.

Hidden API:

  • Scene#gsplatCentersEnabledboolean, default true. Set to false before starting a gsplat asset load to omit centers data for that load (see JSDoc for GSPLAT_RENDERER_RASTER_CPU_SORT and timing).

Impact

  • this saves around 114MB for 10M splats.

@mvaligursky mvaligursky self-assigned this May 6, 2026
@mvaligursky mvaligursky requested review from Copilot and slimbuck May 6, 2026 15:32
@mvaligursky mvaligursky merged commit 02be8c7 into main May 6, 2026
12 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-centers-enabled branch May 6, 2026 18:12
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