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.89k stars 1.19k forks source link

Correction of the Disney BSDF #316

Open efylmzr opened 2 years ago

efylmzr commented 2 years ago

Hi, I was quite annoyed by the mistakes that I found in the PBRT implementation of the Disney BSDF and corrected them. As I explained in https://github.com/mmp/pbrt-v3/issues/313#issue-1042935147 , having a specular transmission lobe turns out to be problematic since all different lobes are sampled with the same probability. Thus, if the ray is inside the material, every time there is a surface interaction most of the samples are wasted. In order to overcome this problem, I discarded the transmission lobe. Right now, spec_trans parameter is set 0 and discarded in 3D (not thin) configuration.

I also corrected the mistakes and compared the material model with Mitsuba by creating 20 renderings. They match.