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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-22 11:49:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-22 11:49:44 +0400
commit226c86ae58cdf292fd415db05c05fba46375738d (patch)
tree3f002f89da94cc0428529f469175c311d0341561 /source/blender/nodes/composite/node_composite_util.c
parentec3399efa6882ea5a8fe023092c0918ee7b135d9 (diff)
use an inline function for rgb -> bw conversion.
Diffstat (limited to 'source/blender/nodes/composite/node_composite_util.c')
-rw-r--r--source/blender/nodes/composite/node_composite_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c
index 70788dfe0c8..f6011843b8a 100644
--- a/source/blender/nodes/composite/node_composite_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -207,7 +207,7 @@ void typecheck_compbuf_color(float *out, float *in, int outtype, int intype)
*out= 0.333333f*(in[0]+in[1]+in[2]);
}
else if (intype==CB_RGBA) {
- *out= in[0]*0.35f + in[1]*0.45f + in[2]*0.2f;
+ *out = rgb_to_bw(in);
}
}
else if (outtype==CB_VEC2) {
@@ -300,7 +300,7 @@ CompBuf *typecheck_compbuf(CompBuf *inbuf, int type)
}
else if (inbuf->type==CB_RGBA) {
for (; x>0; x--, outrf+= 1, inrf+= 4)
- *outrf= inrf[0]*0.35f + inrf[1]*0.45f + inrf[2]*0.2f;
+ *outrf = rgb_to_bw(inrf);
}
}
else if (type==CB_VEC2) {