diff options
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c index 4213a5f5389..e0e595fc8f6 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c @@ -53,29 +53,29 @@ static void do_distance_matte(bNode *node, float *out, float *in) float alpha; distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) + - (c->key[1]-in[1])*(c->key[1]-in[1]) + - (c->key[2]-in[2])*(c->key[2]-in[2])); + (c->key[1]-in[1])*(c->key[1]-in[1]) + + (c->key[2]-in[2])*(c->key[2]-in[2])); VECCOPY(out, in); /*make 100% transparent */ if(distance < tolerence) { - out[3]=0.0; + out[3]=0.0; } /*in the falloff region, make partially transparent */ else if(distance < falloff+tolerence){ - distance=distance-tolerence; - alpha=distance/falloff; - /*only change if more transparent than before */ - if(alpha < in[3]) { - out[3]=alpha; - } - else { /* leave as before */ - out[3]=in[3]; - } + distance=distance-tolerence; + alpha=distance/falloff; + /*only change if more transparent than before */ + if(alpha < in[3]) { + out[3]=alpha; + } + else { /* leave as before */ + out[3]=in[3]; + } } else { - out[3]=in[3]; + out[3]=in[3]; } } |