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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user