Skip to content

Commit

Permalink
Merge pull request #33 from quqixun/master
Browse files Browse the repository at this point in the history
fix issues #9 and #23
  • Loading branch information
xinwen-cs committed Aug 27, 2021
2 parents c3829b9 + 455502e commit 1b7a6bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions renderer/rasterizer.py
Expand Up @@ -15,6 +15,10 @@ def forward(ctx, vertices, triangles, image_width, image_height):
px_barycentric_coords = torch.zeros(image_height, image_width, 3, dtype=torch.float32, device=vertices.device, requires_grad=True)
z_buffer = torch.ones(image_height, image_width, dtype=torch.float32, device=vertices.device)

# fix issue https://github.com/xinwen-cs/AudioDVP/issues/9 and https://github.com/xinwen-cs/AudioDVP/issues/23
if not triangles.is_contiguous():
triangles = triangles.contiguous()

px_triangle_ids, px_barycentric_coords, z_buffer \
= rasterize_triangles_cpp.forward(vertices, triangles, image_width, image_height,px_triangle_ids, px_barycentric_coords, z_buffer)

Expand Down

0 comments on commit 1b7a6bc

Please sign in to comment.