mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-23 07:40:34 +08:00
Culling to frustrum bug fix
Summary: When `z_clip_value = None` and faces are outside the view frustum the shape of one of the tensors in `clip.py` is incorrect. `faces_num_clipped_verts` should be (F,) but it was (F,3). Added a new test to ensure this case is handled. Reviewed By: bottler Differential Revision: D29051282 fbshipit-source-id: 5f4172ba4d4a75d928404dde9abf48aef18c68bd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ef16253953
commit
a0f79318c5
@@ -372,7 +372,7 @@ def clip_faces(
|
||||
# (F) dim tensor containing the number of clipped vertices in each triangle
|
||||
faces_num_clipped_verts = faces_clipped_verts.sum(1)
|
||||
else:
|
||||
faces_num_clipped_verts = torch.zeros([F, 3], device=device)
|
||||
faces_num_clipped_verts = torch.zeros([F], device=device)
|
||||
|
||||
# If no triangles need to be clipped or culled, avoid unnecessary computation
|
||||
# and return early
|
||||
|
||||
Reference in New Issue
Block a user