Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/scene/gsplat/gsplat-sogs-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,14 @@ class GSplatSogsData {
}
});

// patch codebooks starting with a null entry
['scales', 'sh0', 'shN'].forEach((name) => {
const codebook = this.meta[name]?.codebook;
if (codebook?.[0] === null) {
codebook[0] = codebook[1] + (codebook[1] - codebook[255]) / 255;
}
});

if (this.destroyed || device._destroyed) return; // skip the rest if the resource was destroyed
await this.generateCenters();

Expand Down