[Bf-blender-cvs] [5bf003db059] cycles_path_guiding: Fix principled hair test failure
Brecht Van Lommel
noreply at git.blender.org
Fri Sep 23 21:35:23 CEST 2022
Commit: 5bf003db059a2cda71363aa452a98b666b9e3b95
Author: Brecht Van Lommel
Date: Fri Sep 23 21:24:46 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB5bf003db059a2cda71363aa452a98b666b9e3b95
Fix principled hair test failure
===================================================================
M intern/cycles/kernel/closure/bsdf_hair_principled.h
===================================================================
diff --git a/intern/cycles/kernel/closure/bsdf_hair_principled.h b/intern/cycles/kernel/closure/bsdf_hair_principled.h
index dbef7a5cb5a..857b3fbf3a6 100644
--- a/intern/cycles/kernel/closure/bsdf_hair_principled.h
+++ b/intern/cycles/kernel/closure/bsdf_hair_principled.h
@@ -56,7 +56,7 @@ ccl_device_inline float delta_phi(int p, float gamma_o, float gamma_t)
/* Remaps the given angle to [-pi, pi]. */
ccl_device_inline float wrap_angle(float a)
{
- return fmodf(a + M_PI_F, M_2PI_F) - M_PI_F;
+ return (a + M_PI_F) - M_2PI_F * floorf((a + M_PI_F) / M_2PI_F) - M_PI_F;
}
/* Logistic distribution function. */
More information about the Bf-blender-cvs
mailing list