Skip to content

Commit

Permalink
fix get_tile_bin_edges; revert ndc2pix (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
liruilong940607 committed Feb 1, 2024
1 parent 0f71be8 commit e13eff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gsplat/cuda/csrc/forward.cu
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ __global__ void get_tile_bin_edges(
tile_bins[cur_tile_idx].x = 0;
if (idx == num_intersects - 1)
tile_bins[cur_tile_idx].y = num_intersects;
return;
}
if (idx == 0)
return;
int32_t prev_tile_idx = (int32_t)(isect_ids_sorted[idx - 1] >> 32);
if (prev_tile_idx != cur_tile_idx) {
tile_bins[prev_tile_idx].y = idx;
Expand Down
2 changes: 1 addition & 1 deletion gsplat/cuda/csrc/helpers.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <iostream>

inline __device__ float ndc2pix(const float x, const float W, const float cx) {
return 0.5f * W * x + cx + 0.5f;
return 0.5f * W * x + cx - 0.5f;
}

inline __device__ void get_bbox(
Expand Down

0 comments on commit e13eff4

Please sign in to comment.