Skip to content

Commit b51be58

Browse files
bottlerfacebook-github-bot
authored andcommitted
validate sampling_mode
Summary: New sampling mode option in TexturesUV mush match when collating meshes. Reviewed By: patricklabatut Differential Revision: D33235901 fbshipit-source-id: f457473d90bf022e65fe122ef45bf5efad134345
1 parent 7449951 commit b51be58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pytorch3d/renderer/mesh/textures.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,11 @@ def join_batch(self, textures: List["TexturesUV"]) -> "TexturesUV":
10611061
)
10621062
if not align_corners_same:
10631063
raise ValueError("All textures must have the same align_corners value.")
1064+
sampling_mode_same = all(
1065+
tex.sampling_mode == self.sampling_mode for tex in textures
1066+
)
1067+
if not sampling_mode_same:
1068+
raise ValueError("All textures must have the same sampling_mode.")
10641069

10651070
verts_uvs_list = []
10661071
faces_uvs_list = []

0 commit comments

Comments
 (0)