Skip to content

Conversation

@slimbuck
Copy link
Member

Broken in #8215.

@slimbuck slimbuck requested review from a team and Copilot December 19, 2025 11:29
@slimbuck slimbuck self-assigned this Dec 19, 2025
@slimbuck slimbuck added bug Something isn't working area: graphics Graphics related issue labels Dec 19, 2025
Copy link
Contributor

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 fixes a bug in SOG SH (Spherical Harmonics) decompression that was introduced in PR #8215. The issue occurred when the decompress option was enabled - the shBands property was not being calculated because it was only computed in prepareGpuData(), which wasn't called during decompression.

  • Refactored shBands from a private cached property to a public property
  • Extracted band calculation logic into a static calcBands() method
  • Ensured shBands is set in both parsers before decompression or GPU preparation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/scene/gsplat/gsplat-sogs-data.js Changed _shBands to public shBands property, added static calcBands() method, removed getter that was previously caching the value in prepareGpuData()
src/framework/parsers/sogs.js Added call to set shBands using the new static method before decompression path
src/framework/parsers/sog-bundle.js Added call to set shBands using the new static method before decompression path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@slimbuck slimbuck merged commit 40b1982 into playcanvas:main Dec 19, 2025
6 of 7 checks passed
mvaligursky pushed a commit that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants