Cycles: Cleanup and reference actual paper used for BSSRDF sampling

This commit is contained in:
Sergey Sharybin 2016-02-02 18:06:03 +01:00
parent 6bbe59fab1
commit e42852a339
2 changed files with 10 additions and 5 deletions

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

@ -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