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:
Jeremy Reizenstein 2021-06-22 16:06:50 -07:00 committed by Facebook GitHub Bot
parent c538725885
commit 2a0660baab

View File

@ -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 = []