From b4fd9d1d34b96eebbf8954abc1d5a4e3b8a91f11 Mon Sep 17 00:00:00 2001 From: Michele Sanna Date: Mon, 18 May 2020 19:36:07 -0700 Subject: [PATCH] fixes to shader error strings (#204) Summary: Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/204 Reviewed By: gkioxari Differential Revision: D21621695 Pulled By: nikhilaravi fbshipit-source-id: 556f297bef4211c331dfde6471e10762a9956f98 --- pytorch3d/renderer/mesh/shader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pytorch3d/renderer/mesh/shader.py b/pytorch3d/renderer/mesh/shader.py index 9deb2e3b..ccdd43c7 100644 --- a/pytorch3d/renderer/mesh/shader.py +++ b/pytorch3d/renderer/mesh/shader.py @@ -142,7 +142,7 @@ class HardGouraudShader(nn.Module): cameras = kwargs.get("cameras", self.cameras) if cameras is None: msg = "Cameras must be specified either at initialization \ - or in the forward pass of SoftPhongShader" + or in the forward pass of HardGouraudShader" raise ValueError(msg) lights = kwargs.get("lights", self.lights) materials = kwargs.get("materials", self.materials) @@ -187,7 +187,7 @@ class SoftGouraudShader(nn.Module): cameras = kwargs.get("cameras", self.cameras) if cameras is None: msg = "Cameras must be specified either at initialization \ - or in the forward pass of SoftPhongShader" + or in the forward pass of SoftGouraudShader" raise ValueError(msg) lights = kwargs.get("lights", self.lights) materials = kwargs.get("materials", self.materials) @@ -234,7 +234,7 @@ class TexturedSoftPhongShader(nn.Module): cameras = kwargs.get("cameras", self.cameras) if cameras is None: msg = "Cameras must be specified either at initialization \ - or in the forward pass of SoftPhongShader" + or in the forward pass of TexturedSoftPhongShader" raise ValueError(msg) texels = interpolate_texture_map(fragments, meshes) lights = kwargs.get("lights", self.lights) @@ -278,7 +278,7 @@ class HardFlatShader(nn.Module): cameras = kwargs.get("cameras", self.cameras) if cameras is None: msg = "Cameras must be specified either at initialization \ - or in the forward pass of SoftPhongShader" + or in the forward pass of HardFlatShader" raise ValueError(msg) texels = interpolate_vertex_colors(fragments, meshes) lights = kwargs.get("lights", self.lights)