forked from bartvdbraak/blender
Cycles: fix vector math subtract not working correct, patch by Sanne.
This commit is contained in:
parent
233f27a7e1
commit
25b25059ef
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user