Normal Node - Cycles

reviewed by Brecht, with help from Lukas.

Note: dot is reversed compared to Blender.
In Blender Normals point outside, while in Cycles they point inside.
If you use your own custom vector with the Normal Node you will see a difference.
If you feed it with object normals it should work just as good.
This commit is contained in:
Dalai Felinto
2011-12-16 18:15:07 +00:00
parent ce8f64d9f9
commit 3c8ab559a5
11 changed files with 137 additions and 3 deletions

View File

@@ -134,6 +134,7 @@ CCL_NAMESPACE_END
#include "svm_light_path.h"
#include "svm_magic.h"
#include "svm_mapping.h"
#include "svm_normal.h"
#include "svm_wave.h"
#include "svm_math.h"
#include "svm_mix.h"
@@ -300,6 +301,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_VECTOR_MATH:
svm_node_vector_math(kg, sd, stack, node.y, node.z, node.w, &offset);
break;
case NODE_NORMAL:
svm_node_normal(kg, sd, stack, node.y, node.z, node.w, &offset);
break;
case NODE_MAPPING:
svm_node_mapping(kg, sd, stack, node.y, node.z, &offset);
break;