diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-12 12:49:43 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-07-12 12:49:43 +0300 |
commit | 59b93123e9af8f4ab4fa6c51f24ad8fc3fbb1129 (patch) | |
tree | bfe01055f7fd6c6fe264cb0dae15f79b7533b3be /intern | |
parent | e5ee6cb448b3d54aa129aa5407ee0b2591431001 (diff) | |
parent | 87164114a306d5dc9f609695c0c6a8e36d79673d (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/render/nodes.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 166156f7ac3..86e25df1da3 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -2337,6 +2337,12 @@ PrincipledBsdfNode::PrincipledBsdfNode() distribution_orig = NBUILTIN_CLOSURES; } +bool PrincipledBsdfNode::has_surface_bssrdf() +{ + ShaderInput *subsurface_in = input("Subsurface"); + return (subsurface_in->link != NULL || subsurface > CLOSURE_WEIGHT_CUTOFF); +} + void PrincipledBsdfNode::attributes(Shader *shader, AttributeRequestSet *attributes) { if(shader->has_surface) { diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index c6ab47fcc84..c0271a3c8eb 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -374,7 +374,7 @@ public: SHADER_NODE_CLASS(PrincipledBsdfNode) bool has_spatial_varying() { return true; } - bool has_surface_bssrdf() { return true; } + bool has_surface_bssrdf(); bool has_bssrdf_bump(); void compile(SVMCompiler& compiler, ShaderInput *metallic, ShaderInput *subsurface, ShaderInput *subsurface_radius, ShaderInput *specular, ShaderInput *roughness, ShaderInput *specular_tint, ShaderInput *anisotropic, |