diff options
author | Pascal Schoen <pascal_schoen@gmx.net> | 2016-07-26 13:30:25 +0300 |
---|---|---|
committer | Pascal Schoen <pascal_schoen@gmx.net> | 2016-07-26 13:30:25 +0300 |
commit | b3ca6d8a2f4f866b323fc2df0a3beff577218c27 (patch) | |
tree | 363d0831821b7dd16fea40d3e991efbc05be5910 /intern/cycles/render | |
parent | d68729300ee557e90a8e7e4be6eb8ef98db80fe2 (diff) |
Improvement of the SSS in the Disney shader
* Now the bump normal is correctly used for the SSS.
* SSS in Disney uses the Disney diffuse shader
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 7 | ||||
-rw-r--r-- | intern/cycles/render/nodes.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 00f6d168c97..a5ea3d48a34 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -2202,6 +2202,13 @@ void DisneyBsdfNode::compile(OSLCompiler& compiler) compiler.add(this, "node_disney_bsdf"); } +bool DisneyBsdfNode::has_bssrdf_bump() +{ + /* detect if anything is plugged into the normal input besides the default */ + ShaderInput *normal_in = input("Normal"); + return (normal_in->link && normal_in->link->parent->special_type != SHADER_SPECIAL_TYPE_GEOMETRY); +} + /* Translucent BSDF Closure */ TranslucentBsdfNode::TranslucentBsdfNode() diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index a509f30e67e..c0f0dc29099 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -420,6 +420,8 @@ public: SHADER_NODE_CLASS(DisneyBsdfNode) bool has_spatial_varying() { return true; } + bool has_surface_bssrdf() { return true; } + bool has_bssrdf_bump(); void compile(SVMCompiler& compiler, ShaderInput *metallic, ShaderInput *subsurface, ShaderInput *specular, ShaderInput *roughness, ShaderInput *specularTint, ShaderInput *anisotropic, ShaderInput *sheen, ShaderInput *sheenTint, ShaderInput *clearcoat, ShaderInput *clearcoatGloss, |