Commit d62b8c8
feat(SPLAT): Extend with NianticLabs WASM implementation and enable 4-th order spherical harmonics (#18267)
This PR extends the existing SPZ (Splat Zip) loader with optional
support for NianticLab's official SPZ implementation compiled to WASM
(see [NianticLabs SPZ](https://github.com/nianticlabs/spz/) for more
details). The WASM package is published to NPM as `@adobe/spz` because
Adobe is responsible for NPM package publication.
The WASM-based loader is **opt-in**: when a `spzLibraryUrl` is provided
in the loader options, the WASM path is used; otherwise, the built-in
manual TypeScript parser is used as the default. This keeps the loader
zero-dependency by default while allowing users to opt into the richer
WASM implementation.
In particular, the WASM path enables support for the latest features,
such as loading SPZ files with 4th-order spherical harmonics (SH4) and
vendor-specific extensions.
Changes:
- Adds an optional `spzLibraryUrl` field to `SPLATLoadingOptions`. When
provided, the WASM library is loaded dynamically from that URL (similar
to how `InitializeCSG2Async` loads the Manifold library).
- Retains the existing manual SPZ parser (GZip decompression + custom
bit-reading logic) as the default path when `spzLibraryUrl` is not set.
- Adds support for the safe-orbit-camera extension loaded from an SPZ
file (WASM path only).
- Adds support for 4th-order spherical harmonics rendering in both WebGL
and WebGPU shaders, where two optional textures hold the SH4 data.
---------
Co-authored-by: Raymond Fei <yfei@adobe.com>
Co-authored-by: Cedric Guillemet <1312968+CedricGuillemet@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent aba19cb commit d62b8c8
19 files changed
Lines changed: 3682 additions & 3193 deletions
File tree
- packages
- dev
- core/src
- Materials/GaussianSplatting
- Meshes/GaussianSplatting
- Rendering/IBLShadows
- ShadersWGSL
- ShadersInclude
- Shaders
- ShadersInclude
- loaders
- src/SPLAT
- tools/tests/test/visualization
- ReferenceImages
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
182 | 193 | | |
183 | 194 | | |
184 | 195 | | |
| |||
435 | 446 | | |
436 | 447 | | |
437 | 448 | | |
438 | | - | |
| 449 | + | |
439 | 450 | | |
440 | 451 | | |
441 | 452 | | |
| |||
0 commit comments