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
4 changes: 4 additions & 0 deletions src/scene/shader-lib/chunks/gsplat/vert/gsplatCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ bool initCenter(vec3 modelCenter, out SplatCenter center) {
vec4 centerProj = matrix_projection * centerView;

// ensure gaussians are not clipped by camera near and far
#if WEBGPU
centerProj.z = clamp(centerProj.z, 0, abs(centerProj.w));
#else
centerProj.z = clamp(centerProj.z, -abs(centerProj.w), abs(centerProj.w));
#endif

center.view = centerView.xyz / centerView.w;
center.proj = centerProj;
Expand Down