diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-08 18:19:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-02-09 21:58:42 +0300 |
commit | a6968e87f1338081f30725f8f2ca3460e280fea2 (patch) | |
tree | 0fdc61c15c86953fb431894871e7cf0a75dc5031 /intern/cycles/blender/blender_shader.cpp | |
parent | 0df9b2c71517a98760a5e577f434d9d86e4e1910 (diff) |
Cycles: add random walk subsurface scattering to Principled BSDF.
Differential Revision: https://developer.blender.org/D3054
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index d6f7a08431d..33384709947 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -535,6 +535,14 @@ static ShaderNode *add_node(Scene *scene, principled->distribution = CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID; break; } + switch (b_principled_node.subsurface_method()) { + case BL::ShaderNodeBsdfPrincipled::subsurface_method_BURLEY: + principled->subsurface_method = CLOSURE_BSSRDF_PRINCIPLED_ID; + break; + case BL::ShaderNodeBsdfPrincipled::subsurface_method_RANDOM_WALK: + principled->subsurface_method = CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID; + break; + } node = principled; } else if(b_node.is_a(&RNA_ShaderNodeBsdfTranslucent)) { |