[Bf-blender-cvs] [7bd4c78] master: Cleanup: Put all Bump dx/dy code in the beginning here, same as with other nodes.

Thomas Dinges noreply at git.blender.org
Sat Feb 21 12:56:06 CET 2015


Commit: 7bd4c78a1aef1c71b8b0e121fd6ae62f2b35fd83
Author: Thomas Dinges
Date:   Sat Feb 21 12:55:19 2015 +0100
Branches: master
https://developer.blender.org/rB7bd4c78a1aef1c71b8b0e121fd6ae62f2b35fd83

Cleanup: Put all Bump dx/dy code in the beginning here, same as with other nodes.

===================================================================

M	intern/cycles/render/nodes.cpp

===================================================================

diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index e82dd54..fa6ffff 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -2192,11 +2192,16 @@ void GeometryNode::compile(SVMCompiler& compiler)
 {
 	ShaderOutput *out;
 	NodeType geom_node = NODE_GEOMETRY;
+	NodeType attr_node = NODE_ATTR;
 
-	if(bump == SHADER_BUMP_DX)
+	if(bump == SHADER_BUMP_DX) {
 		geom_node = NODE_GEOMETRY_BUMP_DX;
-	else if(bump == SHADER_BUMP_DY)
+		attr_node = NODE_ATTR_BUMP_DX;
+	}
+	else if(bump == SHADER_BUMP_DY) {
 		geom_node = NODE_GEOMETRY_BUMP_DY;
+		attr_node = NODE_ATTR_BUMP_DY;
+	}
 	
 	out = output("Position");
 	if(!out->links.empty()) {
@@ -2242,13 +2247,6 @@ void GeometryNode::compile(SVMCompiler& compiler)
 
 	out = output("Pointiness");
 	if(!out->links.empty()) {
-		NodeType attr_node = NODE_ATTR;
-		if(bump == SHADER_BUMP_DX) {
-			attr_node = NODE_ATTR_BUMP_DX;
-		}
-		else if(bump == SHADER_BUMP_DY) {
-			attr_node = NODE_ATTR_BUMP_DY;
-		}
 		compiler.stack_assign(out);
 		compiler.add_node(attr_node,
 		                  ATTR_STD_POINTINESS,




More information about the Bf-blender-cvs mailing list