Fix #32947: cycles color to float conversion issue after integer socket commit.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Oct 2012 12:22:15 +0000 (12:22 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Oct 2012 12:22:15 +0000 (12:22 +0000)
intern/cycles/render/nodes.cpp

index da0dbc127405b7c063393c858b918f29a4169868..2cdab3a6560abc15fa8960b88a424a81d80eee18 100644 (file)
@@ -1124,6 +1124,9 @@ void ConvertNode::compile(SVMCompiler& compiler)
                        compiler.add_node(NODE_CONVERT, NODE_CONVERT_IV, in->stack_offset, out->stack_offset);
        }
        else if(to == SHADER_SOCKET_FLOAT) {
+               compiler.stack_assign(in);
+               compiler.stack_assign(out);
+
                if(from == SHADER_SOCKET_COLOR)
                        /* color to float */
                        compiler.add_node(NODE_CONVERT, NODE_CONVERT_CF, in->stack_offset, out->stack_offset);
@@ -1132,6 +1135,9 @@ void ConvertNode::compile(SVMCompiler& compiler)
                        compiler.add_node(NODE_CONVERT, NODE_CONVERT_VF, in->stack_offset, out->stack_offset);
        }
        else if(to == SHADER_SOCKET_INT) {
+               compiler.stack_assign(in);
+               compiler.stack_assign(out);
+
                if(from == SHADER_SOCKET_COLOR)
                        /* color to int */
                        compiler.add_node(NODE_CONVERT, NODE_CONVERT_CI, in->stack_offset, out->stack_offset);