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.
This commit is contained in:
Sergey Sharybin 2017-11-20 11:40:55 +01:00
parent f34e03d34d
commit 51e2844387
1 changed files with 1 additions and 1 deletions

View File

@ -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;