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.
This commit is contained in:
Sergey Sharybin 2016-02-05 10:06:08 +01:00
parent da7ddb69e9
commit e688a62712
1 changed files with 2 additions and 2 deletions

View File

@ -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++) {