disallow fars <= nears (#881)

This commit is contained in:
Daniel Crispell authored and GitHub committed 2022-11-02 10:04:04 -07:00
1 parent be70b86b18
commit c53df92b9c
1 file changed
+1
@@ -84,6 +84,7 @@ class AABBBoxCollider(SceneBoxCollider):
# clamp to near plane
near_plane = self.near_plane if self.training else 0
nears = torch.clamp(nears, min=near_plane)
fars = torch.maximum(fars, nears + 1e-6)
return nears, fars