Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-20 13:40:55 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-20 13:40:55 +0300
commit51e2844387c1fefe213d5b3ded9c89083421ce0b (patch)
tree5edd6e5f57fc4667aaddabd98253de61163867ed
parentf34e03d34d79785bdb4710b668b4cf803704c9a4 (diff)
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.
-rw-r--r--intern/cycles/kernel/closure/bssrdf.h2
1 files changed, 1 insertions, 1 deletions
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;