mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
Flexible #channels in TexturesUV.join_scene
Summary: The TexturesUV class supports an arbitrary number of channels. In one place in join_scene we unnecessarily assumed the usual value, 3. Reviewed By: patricklabatut Differential Revision: D29133477 fbshipit-source-id: de8eb15fdd55675da084634d9d99e2a3f4d35401
This commit is contained in:
parent
c538725885
commit
2a0660baab
@ -1121,8 +1121,9 @@ class TexturesUV(TexturesBase):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
merging_plan = pack_unique_rectangles(heights_and_widths)
|
merging_plan = pack_unique_rectangles(heights_and_widths)
|
||||||
|
C = maps[0].shape[-1]
|
||||||
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
|
# pyre-fixme[16]: `Tensor` has no attribute `new_zeros`.
|
||||||
single_map = maps[0].new_zeros((*merging_plan.total_size, 3))
|
single_map = maps[0].new_zeros((*merging_plan.total_size, C))
|
||||||
verts_uvs = self.verts_uvs_list()
|
verts_uvs = self.verts_uvs_list()
|
||||||
verts_uvs_merged = []
|
verts_uvs_merged = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user