[Bf-blender-cvs] [2af62e27e2c] soc-2018-hair-shader: Fix improper optimization in the trimmed logistic function
L. E. Segovia
noreply at git.blender.org
Sat May 26 18:12:37 CEST 2018
Commit: 2af62e27e2c894217b5d7daa880434447ea6ed35
Author: L. E. Segovia
Date: Sat May 26 16:05:47 2018 +0000
Branches: soc-2018-hair-shader
https://developer.blender.org/rB2af62e27e2c894217b5d7daa880434447ea6ed35
Fix improper optimization in the trimmed logistic function
This was the source of the noise that Ronan mentioned.
Ref T54796
===================================================================
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 36d2325a397..8237c13251e 100644
--- a/intern/cycles/kernel/closure/bsdf_hair_principled.h
+++ b/intern/cycles/kernel/closure/bsdf_hair_principled.h
@@ -100,7 +100,7 @@ ccl_device_inline float trimmed_logistic(float x, float s)
/* The logistic distribution is symmetric and centered around zero,
* so logistic_cdf(x, s) = 1 - logistic_cdf(-x, s).
* Therefore, logistic_cdf(x, s)-logistic_cdf(-x, s) = 1 - 2*logistic_cdf(-x, s) */
- float scaling_fac = 1.0f - 2.0f*logistic_cdf(-x, s);
+ float scaling_fac = 1.0f - 2.0f*logistic_cdf(-M_PI_F, s);
float val = logistic(x, s);
return val / scaling_fac;
}
More information about the Bf-blender-cvs
mailing list