Skip to content

Remove highQualitySH option, always use high-quality per-splat SH#8938

Merged
mvaligursky merged 1 commit into
mainfrom
mv-remove-highqualitysh
Jun 22, 2026
Merged

Remove highQualitySH option, always use high-quality per-splat SH#8938
mvaligursky merged 1 commit into
mainfrom
mv-remove-highqualitysh

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

SOG gsplats now always evaluate spherical harmonics per-splat using the correct view direction (from camera position to each splat). The approximate "low quality" SH path and its highQualitySH toggle are removed.

Why:
The approximate path (GSplatResolveSH) resolved a shared SH palette once per frame from the camera orientation (forward vector) rather than each splat's view direction. As a result, splat appearance changed incorrectly when rotating around the camera's nodal point (and did not change under dolly). It was also effectively dead code since the "read SOG directly from source textures" refactor: its gsplatSogColorVS chunk override is no longer #included by any shader, so highQualitySH = false silently dropped SH view-dependence rather than approximating it. The remaining per-splat path already matched the component default (highQualitySH = true).

Changes:

  • Always evaluate SOG spherical harmonics per-splat (correct, view-dependent).
  • Delete GSplatResolveSH (src/scene/gsplat/gsplat-resolve-sh.js) — the approximate SH-palette render pass and its dead chunk overrides.
  • Remove all wiring: the resolveSH field/calls in GSplatInstance, and the highQualitySH serialization property in the component system.

API Changes:

  • Removed GSplatComponent#highQualitySH (getter/setter).
  • Removed the highQualitySH constructor option and the setHighQualitySH() method on GSplatInstance.
  • All of the above were undocumented (no JSDoc). Code that set gsplat.highQualitySH = false no longer has any effect; SOG splats render with full per-splat SH.

SOG gsplats now always evaluate spherical harmonics per-splat using the
correct view direction (camera position to splat). The approximate
"low quality" path is removed.

The approximate path (GSplatResolveSH) evaluated a shared SH palette once
per frame using the camera orientation (forward vector) rather than the
per-splat view direction, so splat appearance changed incorrectly when
rotating around the camera's nodal point. It was also effectively dead
since the SOG-from-source refactor: its gsplatSogColorVS chunk override
was no longer included by any shader, so highQualitySH = false silently
dropped SH view-dependence instead of approximating it.

- Remove GSplatComponent#highQualitySH (getter/setter) and the
  highQualitySH serialization property
- Remove the highQualitySH constructor option and setHighQualitySH()
  method from GSplatInstance (both undocumented)
- Delete gsplat-resolve-sh.js (GSplatResolveSH)
@github-actions

Copy link
Copy Markdown

Build size report

This PR changes the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2282.2 KB (−6.2 KB, −0.27%) 585.2 KB (−1.7 KB, −0.29%) 454.8 KB (−1.2 KB, −0.26%)
playcanvas.min.mjs 2279.6 KB (−6.2 KB, −0.27%) 584.3 KB (−1.7 KB, −0.29%) 454.5 KB (−1.1 KB, −0.23%)

@mvaligursky mvaligursky added the area: graphics Graphics related issue label Jun 22, 2026
@mvaligursky mvaligursky merged commit cf3e3e5 into main Jun 22, 2026
10 checks passed
@mvaligursky mvaligursky deleted the mv-remove-highqualitysh branch June 22, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant