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.
I noticed that PBRT swallows rays that should be totally internally reflected in rough glass materials. If you create a rough glass box and place it in a completely white InfiniteAreaLight (see attached file), the box should have a uniform color, but PBRT produces dark areas where total internal reflection should be happening.
The reason I believe is that when computing the half vector in MicrofacetReflection::f, it is not ensured that it points outwards. However, the FrDielectric function relies on this for handling total internal reflection correctly.
The same problem was reported by a user on Google groups here, which also includes a discussion about a possible fix.
Hi,
I noticed that PBRT swallows rays that should be totally internally reflected in rough glass materials. If you create a rough glass box and place it in a completely white InfiniteAreaLight (see attached file), the box should have a uniform color, but PBRT produces dark areas where total internal reflection should be happening.
The reason I believe is that when computing the half vector in
MicrofacetReflection::f
, it is not ensured that it points outwards. However, theFrDielectric
function relies on this for handling total internal reflection correctly.The same problem was reported by a user on Google groups here, which also includes a discussion about a possible fix.
pbrtfile.zip