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.92k stars 1.2k forks source link

Purpose of CorrectShadingNormal #78

Closed JossWhittle closed 8 years ago

JossWhittle commented 8 years ago

Hi, just wondering what the intuition is behind CorrectShadingNormal in BDPT.cpp, line 54. I gather that it is to compensate for the potential difference in normals due to phong interpolation, but I cannot find any sources in the literature about such a correction coefficient. Why is it only needed to light traced paths?

https://github.com/mmp/pbrt-v3/blob/master/src/integrators/bdpt.cpp#L54

Thanks, Joss

mmp commented 8 years ago

Adjoint light transport is a little unusual. See this paper and in particular section 3.2: https://graphics.stanford.edu/papers/non-symmetric/paper-sv.ps

(There will be coverage of this in the 3rd edition book text.)

JossWhittle commented 8 years ago

Thanks for the response, Matt. The discontinuity example on page 9 really cleared this up for me. Cheers.