Skip to content

Commit

Permalink
validate sampling_mode
Browse files Browse the repository at this point in the history
Summary: New sampling mode option in TexturesUV mush match when collating meshes.

Reviewed By: patricklabatut

Differential Revision: D33235901

fbshipit-source-id: f457473d90bf022e65fe122ef45bf5efad134345
  • Loading branch information
bottler authored and facebook-github-bot committed Dec 21, 2021
1 parent 7449951 commit b51be58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytorch3d/renderer/mesh/textures.py
Expand Up @@ -1061,6 +1061,11 @@ def join_batch(self, textures: List["TexturesUV"]) -> "TexturesUV":
)
if not align_corners_same:
raise ValueError("All textures must have the same align_corners value.")
sampling_mode_same = all(
tex.sampling_mode == self.sampling_mode for tex in textures
)
if not sampling_mode_same:
raise ValueError("All textures must have the same sampling_mode.")

verts_uvs_list = []
faces_uvs_list = []
Expand Down

0 comments on commit b51be58

Please sign in to comment.