Updates to cameras and rasterizer to infer camera type correctly

Summary: Small update to the cameras and rasterizer to correctly infer the type of camera (perspective vs orthographic).

Reviewed By: jcjohnson

Differential Revision: D26267225

fbshipit-source-id: a58ed3bc2ab25553d2a4307c734204c1d41b5176
This commit is contained in:
Nikhila Ravi
2021-02-08 14:30:55 -08:00
committed by Facebook GitHub Bot
parent 39f49c22cd
commit 838b73d3b6
5 changed files with 65 additions and 11 deletions

View File

@@ -500,6 +500,7 @@ class TestRenderMeshes(TestCaseMixin, unittest.TestCase):
blur_radius=np.log(1.0 / 1e-4 - 1.0) * blend_params.sigma,
faces_per_pixel=100,
clip_barycentric_coords=True,
perspective_correct=False,
)
# Load reference image
@@ -844,7 +845,10 @@ class TestRenderMeshes(TestCaseMixin, unittest.TestCase):
cameras = FoVPerspectiveCameras(device=device, R=R, T=T)
raster_settings = RasterizationSettings(
image_size=512, blur_radius=0.0, faces_per_pixel=1
image_size=512,
blur_radius=0.0,
faces_per_pixel=1,
perspective_correct=False,
)
lights = PointLights(
@@ -919,7 +923,10 @@ class TestRenderMeshes(TestCaseMixin, unittest.TestCase):
R, T = look_at_view_transform(2.7, 0.0, 0.0)
cameras = FoVPerspectiveCameras(device=device, R=R, T=T)
raster_settings = RasterizationSettings(
image_size=512, blur_radius=0.0, faces_per_pixel=1
image_size=512,
blur_radius=0.0,
faces_per_pixel=1,
perspective_correct=False,
)
# Init shader settings