diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-02 20:06:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-02 20:06:29 +0300 |
commit | e42852a3395c9934488cecea64936f1c259eeb01 (patch) | |
tree | d6e8f227be84eaa8c8e769e28830477b9bf098fa /intern | |
parent | 6bbe59fab1945ddedb7328b278821f0de2337137 (diff) |
Cycles: Cleanup and reference actual paper used for BSSRDF sampling
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/closure/bssrdf.h | 8 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_subsurface.h | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index f817dcd5f2d..b986ab6ba39 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -83,8 +83,8 @@ ccl_device void bssrdf_gaussian_sample(ShaderClosure *sc, float xi, float *r, fl const float r_squared = -2.0f*v*logf(1.0f - xi*area_truncated); *r = sqrtf(r_squared); - /* h^2 + r^2 = Rm^2 */ - *h = sqrtf(Rm*Rm - r_squared); + /* h^2 + r^2 = Rm^2 */ + *h = sqrtf(Rm*Rm - r_squared); } /* Planar Cubic BSSRDF falloff @@ -184,7 +184,7 @@ ccl_device void bssrdf_cubic_sample(ShaderClosure *sc, float xi, float *r, float r_ = powf(r_, 1.0f + sharpness); Rm *= (1.0f + sharpness); } - + r_ *= Rm; *r = r_; @@ -193,7 +193,7 @@ ccl_device void bssrdf_cubic_sample(ShaderClosure *sc, float xi, float *r, float } /* None BSSRDF falloff - * + * * Samples distributed over disk with no falloff, for reference. */ ccl_device float bssrdf_none_eval(ShaderClosure *sc, float r) diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h index 3693851444e..9ea993a3c6b 100644 --- a/intern/cycles/kernel/kernel_subsurface.h +++ b/intern/cycles/kernel/kernel_subsurface.h @@ -16,7 +16,12 @@ CCL_NAMESPACE_BEGIN -/* NEW BSSRDF: See "BSSRDF Importance Sampling", SIGGRAPH 2013 */ +/* New BSSRDF using disk based sampling. + * + * BSSRDF Importance Sampling, SIGGRAPH 2013 + * http://library.imageworks.com/pdfs/imageworks-library-BSSRDF-sampling.pdf + * + */ /* TODO: * - test using power heuristic for combing bssrdfs |