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

BSSRDF::S() function never gets used #216

Closed anadodik closed 5 years ago

anadodik commented 5 years ago

I'm trying to reimplement the DisneyBSDF, and I notice that the BSSRDF::S function never gets used (meaning that the reimplementation used in DisneyBSSRDF also never gets used).

Is this a bug or am I missing something?

wjakob commented 5 years ago

Hi,

this is not a bug. The current path tracers always importance sample the BSSRDF using the projection-based method, which already evaluates the components of S() internally, so an explicit call would be redundant/inefficient. The function is still included for educational reasons. S() could also be used to implement some other types of sampling schemes.

Best, Wenzel