Fix use of uninitialized variable in Cycles, mostly harmless.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 28 Jul 2016 23:04:01 +0000 (01:04 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 29 Jul 2016 01:29:02 +0000 (03:29 +0200)
intern/cycles/render/nodes.cpp

index ed4debdddfcb9ecce0598f25578afef616446571..3af6a7132901be1759ffc8089e93b431940eed4c 100644 (file)
@@ -2295,6 +2295,7 @@ NODE_DEFINE(SubsurfaceScatteringNode)
 SubsurfaceScatteringNode::SubsurfaceScatteringNode()
 : BsdfNode(node_type)
 {
+       closure = falloff;
 }
 
 void SubsurfaceScatteringNode::compile(SVMCompiler& compiler)
@@ -2305,6 +2306,7 @@ void SubsurfaceScatteringNode::compile(SVMCompiler& compiler)
 
 void SubsurfaceScatteringNode::compile(OSLCompiler& compiler)
 {
+       closure = falloff;
        compiler.parameter(this, "falloff");
        compiler.add(this, "node_subsurface_scattering");
 }