add texture vertex sampling functionality to textures

Summary: Enhance every texture type with `faces_verts_textures_packed` that allows users to query the texture of each vertex in mesh

Reviewed By: nikhilaravi

Differential Revision: D24058778

fbshipit-source-id: 19d0e3a244fa96aae462c47bf52e07dfd3b7c6f0
This commit is contained in:
Georgia Gkioxari
2020-10-06 10:43:06 -07:00
committed by Facebook GitHub Bot
parent 327bd2b976
commit e651a4299c
3 changed files with 173 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ def make_material_atlas(
the formulation from [1].
For a triangle with vertices (v0, v1, v2) we can create a barycentric coordinate system
with the x axis being the vector (v1 - v0) and the y axis being the vector (v2 - v0).
with the x axis being the vector (v0 - v2) and the y axis being the vector (v1 - v2).
The barycentric coordinates range from [0, 1] in the +x and +y direction so this creates
a triangular texture space with vertices at (0, 1), (0, 0) and (1, 0).