Thanks to visit codestin.com
Credit goes to github.com

Skip to content

3dgs spz worker#13490

Open
WilliamLiu-1997 wants to merge 3 commits into
CesiumGS:mainfrom
WilliamLiu-1997:3dgs-spz-worker
Open

3dgs spz worker#13490
WilliamLiu-1997 wants to merge 3 commits into
CesiumGS:mainfrom
WilliamLiu-1997:3dgs-spz-worker

Conversation

@WilliamLiu-1997
Copy link
Copy Markdown

Description

This PR moves SPZ decoding for Gaussian Splat content off the main thread and into a task processor worker.

Previously, loading SPZ-compressed Gaussian Splat tiles could cause severe main-thread stalls. The expensive work included:

  • decoding the SPZ payload with @spz-loader/core
  • extracting decoded Gaussian attributes
  • packing spherical harmonics data into half-float Uint32Array buffers for shader/texture use

For large tiles, especially tiles with SH degree 2 or 3, this could block rendering and make camera interaction freeze or stutter while tiles were loading.

This change adds a decodeSpz worker and routes SPZ decoding through GltfSpzDecoder. The worker now decodes the SPZ buffer, packs spherical harmonics data, transfers decoded typed arrays back to the main thread, and stores the packed SH data on model attributes so GaussianSplat3DTileContent can consume it without doing the packing work on the main thread.

Issue number and link

Fixes #13489

Testing plan

Tested by loading Gaussian Splat tiles with spherical harmonics data and navigating while tiles streamed in.

Before this change:

  1. Load a Gaussian Splat 3D Tiles tileset.
  2. Navigate the scene so new tiles are requested.
  3. Observe visible frame stalls and camera interaction freezes while SPZ tiles load.
  4. Browser performance profiling shows long main-thread tasks during SPZ decode and SH packing.

After this change:

  1. Load the same tileset.
  2. Navigate while tiles stream in.
  3. SPZ decode and SH packing are scheduled on the decodeSpz worker.
  4. The main thread remains more responsive during tile loading.
  5. Decoded attributes and packed spherical harmonics data are still available to GaussianSplat3DTileContent.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

AI acknowledgment

  • I used AI to generate content in this PR
  • If yes, I have reviewed the AI-generated content before submitting

If yes, I used the following Tools(s) and/or Service(s):

ChatGPT

If yes, I used the following Model(s):

GPT-5.5 Extra-High

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for the pull request, @WilliamLiu-1997!

✅ We can confirm we have a CLA on file for you.

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.

SPZ Gaussian Splat tile loading stalls the main thread during decode and SH packing

1 participant