Skip to content

Conversation

@azrogers
Copy link
Contributor

Closes #1219. This PR adds support for the new KHR_gaussian_splatting extension and the KHR_gaussian_splatting_compression_spz_2 extension. The latter is the majority of this PR - it implements SPZ decoding using the spz library, allowing glTFs with SPZ payloads to be read. It also implements backwards compatibility for the KHR_spz_gaussian_splats_compression and KHR_gaussian_splatting_compression_spz extensions, previous iterations that have already had some tilesets created using them.

@azrogers
Copy link
Contributor Author

One random thing to note, might be a concern might not, the SPZ decoding rewrites the color channel to always be a float. This is because I was having some issues with handling conversions to the unsigned byte and unsigned short types that are also allowed, and I figured it wasn't too important to keep the exact data type. But if, for some reason, it is important - I can try to get it working.

@azrogers
Copy link
Contributor Author

Some things I'd like to fix with the spz port (which is done here as an overlay port because there is no official spz port yet):

  • Find a way to put it into a subdirectory, so the includes can be #include <spz/load-spz.h> instead of #include <load-spz.h>
  • Get it to use zstd instead of zlib so we can avoid adding another dependency. This caused issues with the Unreal build for some reason last time I tried it.

kring added 2 commits October 23, 2025 20:47
It now matches the official vcpkg one as of `2025.09.17`, plus it adds
the `loadSpz.patch` patch to add an overload of loadSpz taking a raw
pointer.
@azrogers
Copy link
Contributor Author

azrogers commented Oct 29, 2025

@kring Looks like we are held up by the 2.1.0 release of spz not yet propagating to whatever source the runners are using, but besides that I think it's good to go.

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.

Implement KHR_spz_compression

3 participants