diff options
author | Pascal Schoen <pascal_schoen@gmx.net> | 2016-09-27 10:17:57 +0300 |
---|---|---|
committer | Pascal Schoen <pascal_schoen@gmx.net> | 2016-09-27 10:17:57 +0300 |
commit | 2a5ac509223c838285a00c4c12775567666e7154 (patch) | |
tree | abf791b668f47eb5ef4c220ab4811f746d26b011 | |
parent | e1fa8623915407cea942a07fd0a106b04e113c09 (diff) |
Fixed a bug that caused transparency to be always white when using OSL and
selecting GGX as distribution of the Disney BSDF
-rw-r--r-- | intern/cycles/kernel/shaders/node_disney_bsdf.osl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/shaders/node_disney_bsdf.osl b/intern/cycles/kernel/shaders/node_disney_bsdf.osl index cc6c63f1e43..5372948133d 100644 --- a/intern/cycles/kernel/shaders/node_disney_bsdf.osl +++ b/intern/cycles/kernel/shaders/node_disney_bsdf.osl @@ -88,8 +88,8 @@ shader node_disney_bsdf( float cosNO = dot(Normal, I); float Fr = fresnel_dielectric_cos(cosNO, eta); - BSDF = BSDF + transp * (Fr * microfacet_ggx_fresnel(Normal, Roughness, eta, BaseColor, Cspec0) + - (1.0 - Fr) * microfacet_ggx_refraction(Normal, Roughness, eta)); + BSDF = BSDF + transp * (Fr * microfacet_ggx_fresnel(Normal, Roughness * Roughness, eta, BaseColor, Cspec0) + + (1.0 - Fr) * BaseColor * microfacet_ggx_refraction(Normal, Roughness * Roughness, eta)); } } |