Skip to content

Commit

Permalink
Merge pull request #139 from zctu/main
Browse files Browse the repository at this point in the history
Fix nan problem with Metal
  • Loading branch information
pierotofy authored Nov 17, 2024
2 parents eba9476 + 53103c4 commit 57201dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rasterizer/gsplat-metal/gsplat_metal.metal
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ kernel void rasterize_backward_kernel(
float2 v_xy_local = {0.f, 0.f};
float v_opacity_local = 0.f;
//initialize everything to 0, only set if the lane is valid
if(valid){
if(valid && alpha<0.99f){
// compute the current T for this gaussian
float ra = 1.f / (1.f - alpha);
T *= ra;
Expand Down Expand Up @@ -1430,4 +1430,4 @@ kernel void compute_cov2d_bounds_kernel(
conics[index + 1] = conic.y;
conics[index + 2] = conic.z;
radii[row] = radius;
}
}

0 comments on commit 57201dc

Please sign in to comment.