Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-10 19:56:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-10 19:56:43 +0400
commitfe09b24e86e340e733f91c8ed9fcc7b8519157f4 (patch)
treedfe21334e003d8e73ea993d5fcac54c19facd987 /intern/cycles/kernel/svm/svm.h
parente9a61cd29db61513dedeb4d656e7dadff7439b1a (diff)
Cycles: per-BSDF normal input and new Bump node.
Each BSDF node now has a Normal input, which can be used to set a custom normal for the BSDF, for example if you want to have only bump on one of the layers in a multilayer material. The Bump node can be used to generate a normal from a scalar value, the same as what happens when you connect a scalar value to the displacement output. Documentation has been updated with the latest changes: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes Patch by Agustin Benavidez, some implementation tweaks by me.
Diffstat (limited to 'intern/cycles/kernel/svm/svm.h')
-rw-r--r--intern/cycles/kernel/svm/svm.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index e5167a4f670..5e22edc4696 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -185,7 +185,7 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
break;
}
case NODE_CLOSURE_BSDF:
- svm_node_closure_bsdf(kg, sd, stack, node, randb, path_flag);
+ svm_node_closure_bsdf(kg, sd, stack, node, randb, path_flag, &offset);
break;
case NODE_CLOSURE_EMISSION:
svm_node_closure_emission(sd, stack, node);
@@ -342,7 +342,7 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
svm_node_set_displacement(sd, stack, node.y);
break;
case NODE_SET_BUMP:
- svm_node_set_bump(sd, stack, node.y, node.z, node.w);
+ svm_node_set_bump(kg, sd, stack, node);
break;
case NODE_MATH:
svm_node_math(kg, sd, stack, node.y, node.z, node.w, &offset);
@@ -370,6 +370,9 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_TEX_COORD_BUMP_DY:
svm_node_tex_coord_bump_dy(kg, sd, stack, node.y, node.z);
break;
+ case NODE_CLOSURE_SET_NORMAL:
+ svm_node_set_normal(kg, sd, stack, node.y, node.z );
+ break;
#endif
case NODE_EMISSION_SET_WEIGHT_TOTAL:
svm_node_emission_set_weight_total(kg, sd, node.y, node.z, node.w);
@@ -384,7 +387,7 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
case NODE_LIGHT_FALLOFF:
svm_node_light_falloff(sd, stack, node);
break;
-#endif
+#endif
case NODE_END:
default:
#ifndef __MULTI_CLOSURE__