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

AreaLight regression after issue #154 #183

Closed shadeops closed 4 years ago

shadeops commented 6 years ago

Hello,

I notice an odd issue when using disk based AreaLightSources. While the light samples are taken from the correct side of the surface, the computed emitted light from when rays hit the light source is incorrect. (DiffuseAreaLight::L(...) evaluates on the wrong side of the surface.) I believe this is due to calculation of the geometry normal using the dpdu and dpdv within the SurfaceInteraction class. Prior to #154, the cross product of dpdu and dpdv would result in a geometric normal in the +z axis, now its resulting in a geometric normal in the -z axis.

Pre #154 pre_154

Post #154 post_154

disk.pbrt.gz

Thanks!

mmp commented 4 years ago

Fixed by 2f0852c; closing this out now.