diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-05 12:06:08 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-05 12:06:08 +0300 |
commit | e688a62712a727042e3103f50404b25e2d9580b6 (patch) | |
tree | 2c4b12376de9961a23bc9b641142d09e20d6abd1 | |
parent | da7ddb69e9f30d8bb480fb991a17b01113ad36ec (diff) |
Cycles: Fix for initial guess of the radius for Burley BSSRDF
The value was too high, causing bad Newton iteration step.
Now the value is not so good, but it's still within 9 iterations
and those high number of iterations are only happening in
approx 1% of input values.
-rw-r--r-- | intern/cycles/kernel/closure/bssrdf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index 522bc369618..c2fde6f8fc9 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -242,8 +242,8 @@ ccl_device float bssrdf_burley_root_find(float xi) r = expf(xi * xi * 2.4f) - 1.0f; } else { - float a = expf(xi * xi * 4.0f) - 1.0f; - r = a*a; + /* TODO(sergey): Some nicer curve fit is possible here. */ + r = 15.0f; } /* Solve against scaled radius. */ for(int i = 0; i < max_iteration_count; i++) { |