mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
Pass epsilon value properly to the transformation (#418)
Summary: As for now, epsilon value is ignored, since `kwargs` are passed to constructor only Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/418 Reviewed By: gkioxari Differential Revision: D24730500 Pulled By: nikhilaravi fbshipit-source-id: 7cce820dbe14f8c74d3df4f18c45d50e228c6a45
This commit is contained in:
parent
f248bfc415
commit
831e64efb0
@ -109,11 +109,12 @@ class MeshRasterizer(nn.Module):
|
||||
# NOTE: Retaining view space z coordinate for now.
|
||||
# TODO: Revisit whether or not to transform z coordinate to [-1, 1] or
|
||||
# [0, 1] range.
|
||||
eps = kwargs.get("eps", None)
|
||||
verts_view = cameras.get_world_to_view_transform(**kwargs).transform_points(
|
||||
verts_world
|
||||
verts_world, eps=eps
|
||||
)
|
||||
verts_screen = cameras.get_projection_transform(**kwargs).transform_points(
|
||||
verts_view
|
||||
verts_view, eps=eps
|
||||
)
|
||||
verts_screen[..., 2] = verts_view[..., 2]
|
||||
meshes_screen = meshes_world.update_padded(new_verts_padded=verts_screen)
|
||||
|
Loading…
x
Reference in New Issue
Block a user