diff options
author | Pascal Schoen <pascal_schoen@gmx.net> | 2016-09-08 13:24:43 +0300 |
---|---|---|
committer | Pascal Schoen <pascal_schoen@gmx.net> | 2016-09-08 13:24:43 +0300 |
commit | 7cb37d711938e5626651db21f20da50edd96abaf (patch) | |
tree | 7588f5754a39c0b9052912eb50c1d494a2bb313c /intern/cycles/blender | |
parent | cdd29d06bb86672ed0779eefb8eee95796b8f939 (diff) |
Added selection field to the Disney BSDF node for switching between
"Multiscatter GGX" and "GGX"
In the "GGX" mode there is an additional parameter for changing the
refraction roughness for materials with smooth surfaces and rough interns
(e.g. honey). With the "Multiscatter GGX" this effect can't be produced at
the moment and so here will be no separation of the two roughness values.
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 171b8241280..fc13faef4d1 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -518,7 +518,17 @@ static ShaderNode *add_node(Scene *scene, node = hair; } else if(b_node.is_a(&RNA_ShaderNodeBsdfDisney)) { - node = new DisneyBsdfNode(); + BL::ShaderNodeBsdfDisney b_disney_node(b_node); + DisneyBsdfNode *disney = new DisneyBsdfNode(); + switch (b_disney_node.distribution()) { + case BL::ShaderNodeBsdfDisney::distribution_GGX: + disney->distribution = CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID; + break; + case BL::ShaderNodeBsdfDisney::distribution_MULTI_GGX: + disney->distribution = CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID; + break; + } + node = disney; } else if(b_node.is_a(&RNA_ShaderNodeBsdfTranslucent)) { node = new TranslucentBsdfNode(); |