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

Question about NEE #266

Closed deadmarston closed 4 years ago

deadmarston commented 4 years ago

Generally, we do NEE only with the light samping. But it seems that you do the NEE with both light sampling and bsdf sampling. Could you explain the reason why you do that?

thanks problem

mmp commented 4 years ago

It's because pbrt does direct lighting using multiple importance sampling. See here.

mmp commented 4 years ago

Regarding the difference w.r.t. Mitsuba: pbrt-v3 is a little wasteful. Mitsuba re-uses the same BSDF sample ray for both MIS with direct lighting as well as for indirect illumination. (The next version of pbrt will do it that way as well.)

deadmarston commented 4 years ago

thanks