提交 a8888d1f 编写于 作者: M Matt Pharr

Fix crash with "interface" materials

上级 b39932ae
......@@ -100,9 +100,9 @@ void RenderCPU(BasicScene &parsedScene) {
bool haveSubsurface = false;
for (pbrt::Material mtl : materials)
haveSubsurface |= mtl.HasSubsurfaceScattering();
haveSubsurface |= mtl && mtl.HasSubsurfaceScattering();
for (const auto &namedMtl : namedMaterials)
haveSubsurface |= namedMtl.second.HasSubsurfaceScattering();
haveSubsurface |= namedMtl.second && namedMtl.second.HasSubsurfaceScattering();
if (haveSubsurface && parsedScene.integrator.name != "volpath")
Warning("Some objects in the scene have subsurface scattering, which is "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册