Cycles: fix vector math subtract not working correct, patch by Sanne.

This commit is contained in:
Brecht Van Lommel 2011-05-16 08:08:37 +00:00
parent 233f27a7e1
commit 25b25059ef
2 changed files with 2 additions and 2 deletions

@ -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") {

@ -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) {