Skip to content

Conversation

@slimbuck
Copy link
Member

@slimbuck slimbuck commented Sep 13, 2025

Fixes: playcanvas/splat-transform#52

Description

Spherical harmonic data was being wrongly extracted for SOG scenes with 1 or 2 bands:
fuji

This is now fixed:
Screenshot 2025-09-13 at 09 40 36

@slimbuck slimbuck requested review from a team and Copilot September 13, 2025 08:41
@slimbuck slimbuck self-assigned this Sep 13, 2025
@slimbuck slimbuck added bug Something isn't working area: graphics Graphics related issue labels Sep 13, 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 spherical harmonic data extraction for SOG (Splat on Geometry) scenes with 1 or 2 bands instead of the previously hardcoded 3 bands. The fix dynamically calculates the number of spherical harmonic coefficients based on the actual number of bands in the data.

  • Extracts shBands from the data object to determine the correct number of bands
  • Replaces hardcoded coefficient count of 15 with dynamic calculation based on band count
  • Updates loop iterations to use the calculated coefficient count instead of fixed value

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@slimbuck slimbuck merged commit 86070cb into playcanvas:main Sep 14, 2025
7 checks passed
slimbuck added a commit that referenced this pull request Sep 15, 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.

Significant quality loss in SOG compressed files

2 participants