Skip to content

Add KHR_gaussian_splatting and SPZ_2 extension support#137

Open
gugu23456789 wants to merge 1 commit into
spnda:mainfrom
gugu23456789:feature/khr-spz-2-support
Open

Add KHR_gaussian_splatting and SPZ_2 extension support#137
gugu23456789 wants to merge 1 commit into
spnda:mainfrom
gugu23456789:feature/khr-spz-2-support

Conversation

@gugu23456789

@gugu23456789 gugu23456789 commented Feb 19, 2026

Copy link
Copy Markdown

This PR adds support for the Khronos glTF extensions:

  • KHR_gaussian_splatting
  • KHR_gaussian_splatting_compression_spz_2

Changes

  • Added GaussianSplatExtension and GaussianSplatSpzCompression structures in types.hpp
  • Added JSON export support in fastgltf.cpp
  • Added FASTGLTF_ENABLE_KHR_GAUSSIAN_SPLATTING compile flag (default ON)

Usage

// The extension is enabled by default
// To disable: -DFASTGLTF_ENABLE_KHR_GAUSSIAN_SPLATTING=OFF

// Access the extension
if (primitive.gaussianSplat) {
    if (primitive.gaussianSplat->spzCompression) {
        auto bufferView = primitive.gaussianSplat->spzCompression->bufferView;
    }
}

Specification

https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_gaussian_splatting
KhronosGroup/glTF#2531 (SPZ_2 extension, pending merge)

Testing

  • Tested with SPZ to GLB conversion
  • Verified JSON output format matches specification

@spnda

spnda commented Apr 20, 2026

Copy link
Copy Markdown
Owner

I think there are missing commits, since only the exporting code and the type definitions are included. Otherwise, I'd be happy to merge this. Also, the extension has been merged so there's no need to hide it behind the compile-time flag.

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.

2 participants