From 51e2844387c1fefe213d5b3ded9c89083421ce0b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 20 Nov 2017 11:40:55 +0100 Subject: Cycles: Fix wrong behavior of sharpness in Cubic SSS Was giving difference when using sharpness of 1.0 and 0.999 even though the result was expected to be really close to each other. This SSS profile will probably be removed in the future in favor of more physically bases Burley, but for the time being don't see anything wrong fixing an existing code. --- intern/cycles/kernel/closure/bssrdf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/kernel/closure/bssrdf.h') diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index 6791c0b83cc..ec10e452148 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -119,7 +119,7 @@ ccl_device float bssrdf_cubic_eval(const float radius, const float sharpness, fl else { Rmy = powf(Rm, y); ry = powf(r, y); - ryinv = (r > 0.0f)? powf(r, 2.0f*y - 2.0f): 0.0f; + ryinv = (r > 0.0f)? powf(r, y - 1.0f): 0.0f; } const float Rmy5 = (Rmy*Rmy) * (Rmy*Rmy) * Rmy; -- cgit v1.2.3