Skip to content

Commit

Permalink
Update raymarching.cu
Browse files Browse the repository at this point in the history
  • Loading branch information
kwea123 authored Dec 25, 2022
1 parent 5ad36a0 commit 3d65ee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/csrc/raymarching.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inline __host__ __device__ float calc_dt(float t, float exp_step_factor, int max
// [0.5, 1) -> 1
// [1, 2) -> 2
inline __device__ int mip_from_pos(const float x, const float y, const float z, const int cascades) {
const float mx = fmaxf(fabsf(x), fmaxf(fabs(y), fabs(z)));
const float mx = fmaxf(fabsf(x), fmaxf(fabsf(y), fabsf(z)));
int exponent; frexpf(mx, &exponent);
return min(cascades-1, max(0, exponent+1));
}
Expand Down Expand Up @@ -451,4 +451,4 @@ std::vector<torch::Tensor> raymarching_test_cu(
}));

return {xyzs, dirs, deltas, ts, N_eff_samples};
}
}

0 comments on commit 3d65ee1

Please sign in to comment.