tizian / specular-manifold-sampling

Code for "Specular Manifold Sampling for Rendering High-Frequency Caustics and Glints" (SIGGRAPH 2020) by Tizian Zeltner, Iliyan Georgiev, and Wenzel Jakob
Other
213 stars 24 forks source link

Eta in jacobian do/dh for non-delta refractive bsdf case #3

Closed ommaury closed 3 years ago

ommaury commented 4 years ago

Hi Tizian,

For non-delta refractive bsdfs, when deriving the jacobian do/dh in the specular reflectance computation method (in the manifold_ss.pp and manifold_ms.cpp files), it seems you always use the bsdf raw eta, regardless of which side of the interface the ray comes from:

https://github.com/tizian/specular-manifold-sampling/blob/master/src/librender/manifold_ss.cpp#L647 https://github.com/tizian/specular-manifold-sampling/blob/master/src/librender/manifold_ms.cpp#L960

Shouldn't there be a test to invert eta if you're coming from the inside (as it is indeed the case for typical use cases)?

Thanks, Olivier

tizian commented 4 years ago

Hi Olivier, Good catch! Indeed that seems to be a small oversight. I'll push an update in a second. Thanks for reporting it! Best, Tizian