drtk.render#
Render depth and barycentric coordinates from a mesh. |
|
Pure PyTorch reference implementation used by tests. |
- drtk.render(v, vi, index_img)[source]#
Render depth and barycentric coordinates from a mesh.
- Parameters:
v – [N, V, 3] tensor of vertex positions.
vi – [N, F, 3] or [F, 3] tensor of triangle indices.
- Returns:
[N, H, W] tensor of depth values. bary_img: [N, H, W, 3] tensor of barycentric coordinates.
- Return type:
depth_img
- drtk.render_ref(v, vi, index_img)[source]#
Pure PyTorch reference implementation used by tests.
This helper is intentionally not part of the documented public API. See
drtk.render()for the supported implementation.