mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.8k stars 429 forks source link

SubsurfaceMaterial::ToString() is missing the normalMap #358

Closed llemarie-git closed 1 year ago

llemarie-git commented 1 year ago

In materials.cpp, the function SubsurfaceMaterial::ToString() uses normalMap: %s in the format string, but does not have the normalMap->ToString() argument like the other material types. This causes a runtime crash when calling ToString() on a subsurface material (such as in the head.pbrt model). Other materials are fine. The fix should be to either add the missing normalMap argument to StringPrintf(), or to remove it from the format string.

mmp commented 1 year ago

Fixed now--thanks!