[Bf-blender-cvs] [6e6ae173357] master: Fix reversed `cosNI` and `cosNO` in Cycles anisotropic beckmann G1

Weizhen Huang noreply at git.blender.org
Wed Jan 18 13:11:01 CET 2023


Commit: 6e6ae1733579bf56ee6269ff25114ac1de46b44f
Author: Weizhen Huang
Date:   Wed Jan 18 13:08:33 2023 +0100
Branches: master
https://developer.blender.org/rB6e6ae1733579bf56ee6269ff25114ac1de46b44f

Fix reversed `cosNI` and `cosNO` in Cycles anisotropic beckmann G1

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

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 611d45b73cc..90ae42dd7a6 100644
--- a/intern/cycles/kernel/closure/bsdf_microfacet.h
+++ b/intern/cycles/kernel/closure/bsdf_microfacet.h
@@ -871,8 +871,8 @@ ccl_device Spectrum bsdf_microfacet_beckmann_eval_reflect(ccl_private const Micr
     D = expf(-slope_x * slope_x - slope_y * slope_y) / (M_PI_F * alpha2 * cosThetaM4);
 
     /* G1(i,m) and G1(o,m) */
-    G1i = bsdf_beckmann_aniso_G1(alpha_x, alpha_y, cosNO, dot(wi, X), dot(wi, Y));
-    G1o = bsdf_beckmann_aniso_G1(alpha_x, alpha_y, cosNI, dot(wo, X), dot(wo, Y));
+    G1i = bsdf_beckmann_aniso_G1(alpha_x, alpha_y, cosNI, dot(wi, X), dot(wi, Y));
+    G1o = bsdf_beckmann_aniso_G1(alpha_x, alpha_y, cosNO, dot(wo, X), dot(wo, Y));
   }
 
   float G = G1i * G1o;



More information about the Bf-blender-cvs mailing list