[Bf-blender-cvs] [e688a62] master: Cycles: Fix for initial guess of the radius for Burley BSSRDF

Sergey Sharybin noreply at git.blender.org
Fri Feb 5 10:08:02 CET 2016


Commit: e688a62712a727042e3103f50404b25e2d9580b6
Author: Sergey Sharybin
Date:   Fri Feb 5 10:06:08 2016 +0100
Branches: master
https://developer.blender.org/rBe688a62712a727042e3103f50404b25e2d9580b6

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.

===================================================================

M	intern/cycles/kernel/closure/bssrdf.h

===================================================================

diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index 522bc36..c2fde6f 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++) {




More information about the Bf-blender-cvs mailing list