mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.87k stars 1.18k forks source link

A missing check in MicrofacetTransmission::f #228

Closed xiamengqi2012 closed 4 years ago

xiamengqi2012 commented 5 years ago

I am wondering if MicrofacetTransmission::f is missing a check Dot(wo, wh) Dot(wi, wh)<0. I think right now it can produce nonzero results when Dot(wo, wh) Dot(wi, wh)>=0. I observed weird artifacts when I path traced Microfacet layers to render layered materials.

mmp commented 4 years ago

You're right--thanks for reporting that, and apologies for the trouble with your work rendering layered materials... Fixed now.