Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing latent issue with single intersection #95

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions gsplat/cuda/csrc/forward.cu
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,11 @@ __global__ void get_tile_bin_edges(
return;
// save the indices where the tile_id changes
int32_t cur_tile_idx = (int32_t)(isect_ids_sorted[idx] >> 32);
if (idx == 0) {
tile_bins[cur_tile_idx].x = 0;
return;
}
if (idx == num_intersects - 1) {
tile_bins[cur_tile_idx].y = num_intersects;
if (idx == 0 || idx == num_intersects - 1) {
if (idx == 0)
tile_bins[cur_tile_idx].x = 0;
if (idx == num_intersects - 1)
tile_bins[cur_tile_idx].y = num_intersects;
return;
}
int32_t prev_tile_idx = (int32_t)(isect_ids_sorted[idx - 1] >> 32);
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 + 0.5f + cx;
return 0.5f * W * x + cx - 0.5;
}

inline __device__ void get_bbox(
Expand Down