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>2011-04-28 15:45:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-04-28 15:45:06 +0400
commit791f6c94fbb593291b4eca46779736062ffe3927 (patch)
tree3b39795326690b57b87ffc8c295da0f601dff4c5 /intern/cycles/kernel/osl/nodes
parent1484169c2f5b04eda9fa4a00fcdb84257718a6c1 (diff)
Cycles: fix for vector math node by Lukas Toenne, thanks.
Diffstat (limited to 'intern/cycles/kernel/osl/nodes')
-rw-r--r--intern/cycles/kernel/osl/nodes/node_vector_math.osl14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_vector_math.osl b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
index c6231d4350d..302351372c2 100644
--- a/intern/cycles/kernel/osl/nodes/node_vector_math.osl
+++ b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
@@ -22,31 +22,31 @@ shader node_vector_math(
string type = "Add",
vector Vector1 = vector(0.0, 0.0, 0.0),
vector Vector2 = vector(0.0, 0.0, 0.0),
- output float Fac = 0.0,
+ output float Value = 0.0,
output vector Vector = vector(0.0, 0.0, 0.0))
{
if(type == "Add") {
Vector = Vector1 + Vector2;
- Fac = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
+ Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
}
if(type == "Subtract") {
Vector = Vector1 + Vector2;
- Fac = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
+ Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
}
if(type == "Average") {
- Fac = length(Vector1 + Vector2);
+ Value = length(Vector1 + Vector2);
Vector = normalize(Vector1 + Vector2);
}
if(type == "Dot Product") {
- Fac = dot(Vector1, Vector2);
+ Value = dot(Vector1, Vector2);
}
if(type == "Cross Product") {
vector c = cross(Vector1, Vector2);
- Fac = length(c);
+ Value = length(c);
Vector = normalize(c);
}
if(type == "Normalize") {
- Fac = length(Vector1);
+ Value = length(Vector1);
Vector = normalize(Vector1);
}
}