Commit: 10cb9a193b7ed935deb34af7eb48a657c7b3c222
Author: Lukas Stockner
Date:   Tue Aug 9 03:45:51 2016 +0200
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB10cb9a193b7ed935deb34af7eb48a657c7b3c222

Cycles: Fix GGX shader after recent changes to numerical stability

===================================================================

M       intern/cycles/kernel/closure/bsdf_microfacet.h

===================================================================

diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h 
b/intern/cycles/kernel/closure/bsdf_microfacet.h
index 183c21b..e7ec183 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet.h
@@ -146,7 +146,7 @@ ccl_device_inline void microfacet_ggx_sample_slopes(
        /* sample slope_x */
        const float A = 2.0f*randu*G1_inv - 1.0f;
        const float AA = A*A;
-       const float tmp = 1.0f/max(AA - 1.0f, 1e-7f);
+       const float tmp = 1.0f/(AA - 1.0f);
        const float B = tan_theta_i;
        const float BB = B*B;
        const float D = safe_sqrtf(BB*(tmp*tmp) - (AA - BB)*tmp);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to