提交 0e753cd4 编写于 作者: M Matt Pharr

Improve --pixel-material output

上级 be81bf75
......@@ -376,9 +376,18 @@ void CPURender(ParsedScene &parsedScene) {
if (!intr.material)
ErrorExit("No material at intersection point.");
Transform worldFromRender = camera.GetCameraTransform().WorldFromRender();
Printf("World-space p: %s\n", worldFromRender(intr.p()));
Printf("World-space n: %s\n", worldFromRender(intr.n));
Printf("World-space ns: %s\n", worldFromRender(intr.shading.n));
for (const auto &mtl : namedMaterials)
if (mtl.second == intr.material)
if (mtl.second == intr.material) {
Printf("Named material: %s\n", mtl.first);
return;
}
// If we didn't find a named material, dump out the whole thing.
Printf("%s\n\n", intr.material.ToString());
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册