[Bf-blender-cvs] [2a5ac50] cycles_disney_brdf: Fixed a bug that caused transparency to be always white when using OSL and selecting GGX as distribution of the Disney BSDF
Pascal Schoen
noreply at git.blender.org
Tue Sep 27 11:22:39 CEST 2016
Commit: 2a5ac509223c838285a00c4c12775567666e7154
Author: Pascal Schoen
Date: Tue Sep 27 09:17:57 2016 +0200
Branches: cycles_disney_brdf
https://developer.blender.org/rB2a5ac509223c838285a00c4c12775567666e7154
Fixed a bug that caused transparency to be always white when using OSL and
selecting GGX as distribution of the Disney BSDF
===================================================================
M intern/cycles/kernel/shaders/node_disney_bsdf.osl
===================================================================
diff --git a/intern/cycles/kernel/shaders/node_disney_bsdf.osl b/intern/cycles/kernel/shaders/node_disney_bsdf.osl
index cc6c63f..5372948 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));
}
}
More information about the Bf-blender-cvs
mailing list