Skip to content

Commit b4fd9d1

Browse files
Michele Sannafacebook-github-bot
authored andcommitted
fixes to shader error strings (facebookresearch#204)
Summary: Pull Request resolved: facebookresearch#204 Reviewed By: gkioxari Differential Revision: D21621695 Pulled By: nikhilaravi fbshipit-source-id: 556f297bef4211c331dfde6471e10762a9956f98
1 parent d8987c6 commit b4fd9d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pytorch3d/renderer/mesh/shader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def forward(self, fragments, meshes, **kwargs) -> torch.Tensor:
142142
cameras = kwargs.get("cameras", self.cameras)
143143
if cameras is None:
144144
msg = "Cameras must be specified either at initialization \
145-
or in the forward pass of SoftPhongShader"
145+
or in the forward pass of HardGouraudShader"
146146
raise ValueError(msg)
147147
lights = kwargs.get("lights", self.lights)
148148
materials = kwargs.get("materials", self.materials)
@@ -187,7 +187,7 @@ def forward(self, fragments, meshes, **kwargs) -> torch.Tensor:
187187
cameras = kwargs.get("cameras", self.cameras)
188188
if cameras is None:
189189
msg = "Cameras must be specified either at initialization \
190-
or in the forward pass of SoftPhongShader"
190+
or in the forward pass of SoftGouraudShader"
191191
raise ValueError(msg)
192192
lights = kwargs.get("lights", self.lights)
193193
materials = kwargs.get("materials", self.materials)
@@ -234,7 +234,7 @@ def forward(self, fragments, meshes, **kwargs) -> torch.Tensor:
234234
cameras = kwargs.get("cameras", self.cameras)
235235
if cameras is None:
236236
msg = "Cameras must be specified either at initialization \
237-
or in the forward pass of SoftPhongShader"
237+
or in the forward pass of TexturedSoftPhongShader"
238238
raise ValueError(msg)
239239
texels = interpolate_texture_map(fragments, meshes)
240240
lights = kwargs.get("lights", self.lights)
@@ -278,7 +278,7 @@ def forward(self, fragments, meshes, **kwargs) -> torch.Tensor:
278278
cameras = kwargs.get("cameras", self.cameras)
279279
if cameras is None:
280280
msg = "Cameras must be specified either at initialization \
281-
or in the forward pass of SoftPhongShader"
281+
or in the forward pass of HardFlatShader"
282282
raise ValueError(msg)
283283
texels = interpolate_vertex_colors(fragments, meshes)
284284
lights = kwargs.get("lights", self.lights)

0 commit comments

Comments
 (0)