diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-07 22:43:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-01 19:46:44 +0300 |
commit | 866be3423c61236a90fa071509459b9c659dd9bf (patch) | |
tree | 153ce2bf3131bb61e2f7fd56675f687b1f41f49b | |
parent | 440d647cc10fdf9cc781f9b6c7cb6fee23aea72a (diff) |
Fix incorrect MIS with principled BSDF and specular roughness 0.
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_microfacet.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index 49d396f14b2..18b645e0ecb 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -603,8 +603,7 @@ ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals *kg, const ShaderClosure /* if fresnel is used, calculate the color with reflection_color(...) */ if(use_fresnel) { - *pdf = 1.0f; - *eval = reflection_color(bsdf, *omega_in, m); + *eval *= reflection_color(bsdf, *omega_in, m); } label = LABEL_REFLECT | LABEL_SINGULAR; |