Cycles: Implement approximate reflectance profiles

Using this paper:

  http://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf

This model gives less blurry results than the Cubic and Gaussian
we had implemented:

- Cubic: https://developer.blender.org/F279670
- Burley: https://developer.blender.org/F279671

The model is called "Christensen-Burley" in the interface, which
actually should be read as "Physically based" or "Realistic".

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht, dingto

Subscribers: robocyte

Differential Revision: https://developer.blender.org/D1759
This commit is contained in:
Sergey Sharybin
2016-02-04 03:34:49 +05:00
parent d8a998ce71
commit ad26407b52
15 changed files with 174 additions and 10 deletions

View File

@@ -105,5 +105,34 @@ ClosureParam *closure_bssrdf_gaussian_params()
CCLOSURE_PREPARE(closure_bssrdf_gaussian_prepare, GaussianBSSRDFClosure)
/* Burley */
class BurleyBSSRDFClosure : public CBSSRDFClosure {
public:
BurleyBSSRDFClosure()
{}
void setup()
{
sc.type = CLOSURE_BSSRDF_BURLEY_ID;
sc.data0 = fabsf(average(radius));
}
};
ClosureParam *closure_bssrdf_burley_params()
{
static ClosureParam params[] = {
CLOSURE_FLOAT3_PARAM(BurleyBSSRDFClosure, sc.N),
CLOSURE_FLOAT3_PARAM(BurleyBSSRDFClosure, radius),
CLOSURE_FLOAT_PARAM(BurleyBSSRDFClosure, sc.data1),
CLOSURE_FLOAT3_PARAM(BurleyBSSRDFClosure, albedo),
CLOSURE_STRING_KEYPARAM(BurleyBSSRDFClosure, label, "label"),
CLOSURE_FINISH_PARAM(BurleyBSSRDFClosure)
};
return params;
}
CCLOSURE_PREPARE(closure_bssrdf_burley_prepare, BurleyBSSRDFClosure)
CCL_NAMESPACE_END