Skip to content

Commit 2e8c8a0

Browse files
authored
Gsplat rotation fix (#7587)
1 parent 3fa9ca2 commit 2e8c8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scene/shader-lib/chunks/gsplat/vert/gsplatData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mat3 quatToMat3(vec4 R) {
3232
}
3333
3434
vec4 unpackRotation(vec3 packed) {
35-
return vec4(packed.xyz, sqrt(1.0 - dot(packed, packed)));
35+
return vec4(packed.xyz, sqrt(max(0.0, 1.0 - dot(packed, packed))));
3636
}
3737
3838
// sample covariance vectors

0 commit comments

Comments
 (0)