diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-07 18:27:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-11 19:22:54 +0300 |
commit | 73a05ff9e83a31be34d32a92cd5fb4d17994e342 (patch) | |
tree | 06f0312affd92e58393216186f1519125a7c302c /intern/cycles/kernel/osl | |
parent | 40360253aefd1f3451d5b413595bcbb143425b84 (diff) |
Cycles: restore Christensen-Burley SSS
There is not enough time before the release to improve Random Walk to handle
all cases this was used for, so restore it for now.
Since there is no more path splitting in cycles-x, this can increase noise in
non-flat areas for the sample number of samples, though fewer rays will be traced
also. This is fundamentally a trade-off we made in the new design and why Random
Walk is a better fit. However the importance resampling we do now does help to
reduce noise.
Differential Revision: https://developer.blender.org/D12800
Diffstat (limited to 'intern/cycles/kernel/osl')
-rw-r--r-- | intern/cycles/kernel/osl/osl_bssrdf.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/kernel/osl/osl_bssrdf.cpp b/intern/cycles/kernel/osl/osl_bssrdf.cpp index 5d968ed85e0..b6b0d72103a 100644 --- a/intern/cycles/kernel/osl/osl_bssrdf.cpp +++ b/intern/cycles/kernel/osl/osl_bssrdf.cpp @@ -50,6 +50,7 @@ CCL_NAMESPACE_BEGIN using namespace OSL; +static ustring u_burley("burley"); static ustring u_random_walk_fixed_radius("random_walk_fixed_radius"); static ustring u_random_walk("random_walk"); @@ -68,7 +69,10 @@ class CBSSRDFClosure : public CClosurePrimitive { void setup(ShaderData *sd, int path_flag, float3 weight) { - if (method == u_random_walk_fixed_radius) { + if (method == u_burley) { + alloc(sd, path_flag, weight, CLOSURE_BSSRDF_BURLEY_ID); + } + else if (method == u_random_walk_fixed_radius) { alloc(sd, path_flag, weight, CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID); } else if (method == u_random_walk) { |