Skip to content

Commit

Permalink
Hot fix (#43)
Browse files Browse the repository at this point in the history
* support alpha_thre for rendering and ray marching. default to zero

* bump version

* hot fix
  • Loading branch information
liruilong940607 authored Oct 4, 2022
1 parent 542f431 commit f6ca5ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nerfacc/cuda/csrc/rendering.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ __global__ void rendering_forward_kernel(

// accumulated rendering
scalar_t T = 1.f;
int j = 0;
for (; j < steps; ++j)
int cnt = 0;
for (int j = 0; j < steps; ++j)
{
if (T < early_stop_eps)
{
Expand Down Expand Up @@ -86,10 +86,11 @@ __global__ void rendering_forward_kernel(
{
compact_selector[j] = true;
}
cnt += 1;
}
if (num_steps != nullptr)
{
*num_steps = j;
*num_steps = cnt;
}
return;
}
Expand Down

0 comments on commit f6ca5ba

Please sign in to comment.