Skip to content

Commit 2b06953

Browse files
committed
Patch null SOG entry (#8056)
1 parent fd94a5b commit 2b06953

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/scene/gsplat/gsplat-sogs-data.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,14 @@ class GSplatSogsData {
534534
}
535535
});
536536

537+
// patch codebooks starting with a null entry
538+
['scales', 'sh0', 'shN'].forEach((name) => {
539+
const codebook = this.meta[name]?.codebook;
540+
if (codebook?.[0] === null) {
541+
codebook[0] = codebook[1] + (codebook[1] - codebook[255]) / 255;
542+
}
543+
});
544+
537545
if (this.destroyed || device._destroyed) return; // skip the rest if the resource was destroyed
538546
await this.generateCenters();
539547

0 commit comments

Comments
 (0)