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:
-rw-r--r--intern/cycles/kernel/osl/nodes/node_vector_math.osl2
-rw-r--r--intern/cycles/kernel/svm/svm_math.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_vector_math.osl b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
index 302351372c2..9e0f0b60522 100644
--- a/intern/cycles/kernel/osl/nodes/node_vector_math.osl
+++ b/intern/cycles/kernel/osl/nodes/node_vector_math.osl
@@ -30,7 +30,7 @@ shader node_vector_math(
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
}
if(type == "Subtract") {
- Vector = Vector1 + Vector2;
+ Vector = Vector1 - Vector2;
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2]))/3.0;
}
if(type == "Average") {
diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h
index 6650a10a4d9..401bd22b45a 100644
--- a/intern/cycles/kernel/svm/svm_math.h
+++ b/intern/cycles/kernel/svm/svm_math.h
@@ -121,7 +121,7 @@ __device void svm_vector_math(float *Fac, float3 *Vector, NodeVectorMath type, f
*Fac = (fabsf(Vector->x) + fabsf(Vector->y) + fabsf(Vector->z))/3.0f;
}
else if(type == NODE_VECTOR_MATH_SUBTRACT) {
- *Vector = Vector1 + Vector2;
+ *Vector = Vector1 - Vector2;
*Fac = (fabsf(Vector->x) + fabsf(Vector->y) + fabsf(Vector->z))/3.0f;
}
else if(type == NODE_VECTOR_MATH_AVERAGE) {