Skip to content

Commit

Permalink
If origin is not in a voxel of the last level, this voxel should be m…
Browse files Browse the repository at this point in the history
…ark as hit
  • Loading branch information
Burningdust21 committed Dec 30, 2021
1 parent 5d55562 commit 5e795d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kaolin/csrc/render/spc/raytrace_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ decide_cuda_kernel(
if (depth[tidx] > 0.0){
// Count # of occupied voxels for expansion, if more levels are left
info[tidx] = not_done ? __popc(octree[pidx]) : 1;
} else if (depth[tidx] < 0.0){
// Origin is inside current level's voxel, keep intersecting if more levels are left
info[tidx] = not_done ? __popc(octree[pidx]) : 0;
} else {
info[tidx] = 0;
}
Expand Down Expand Up @@ -165,6 +168,9 @@ decide_cuda_kernel(
if (depth[tidx].x > 0.0 && depth[tidx].y > 0.0){
// Count # of occupied voxels for expansion, if more levels are left
info[tidx] = not_done ? __popc(octree[pidx]) : 1;
} else if (depth[tidx].x < 0.0 && depth[tidx].y < 0.0){
// Origin is inside current level's voxel, keep intersecting if more levels are left
info[tidx] = not_done ? __popc(octree[pidx]) : 0;
} else {
info[tidx] = 0;
}
Expand Down

0 comments on commit 5e795d5

Please sign in to comment.