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-13 00:04:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 00:04:55 +0400
commite1241030db424ce10e9fee04076ff7e209eac98c (patch)
treeac8e1a81a81fa130e166366c6b93587e77e4188f /source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
parent7fec7070d7fcf7bde53768e555b40b57ef4a7552 (diff)
yse BLI_math for the compositor in more places.
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp40
1 files changed, 12 insertions, 28 deletions
diff --git a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
index 602e18521ee..fba3eca4af9 100644
--- a/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp
@@ -42,28 +42,20 @@ void GlareSimpleStarOperation::generateGlare(float *data, MemoryBuffer *inputTil
xm = x - i;
xp = x + i;
tbuf1->read(c, x, y);
- c[0]*=f1; c[1]*=f1 ; c[2] *=f1;
+ mul_v3_fl(c, f1);
tbuf1->read(tc, (settings->angle ? xm : x), ym);
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
tbuf1->read(tc, (settings->angle ? xp : x), yp);
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
c[3] = 1.0f;
tbuf1->writePixel(x, y, c);
tbuf2->read(c, x, y);
- c[0]*=f1; c[1]*=f1 ; c[2] *=f1;
+ mul_v3_fl(c, f1);
tbuf2->read(tc, xm, (settings->angle ? yp : y));
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
tbuf2->read(tc, xp, (settings->angle ? ym : y));
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
c[3] = 1.0f;
tbuf2->writePixel(x, y, c);
@@ -77,28 +69,20 @@ void GlareSimpleStarOperation::generateGlare(float *data, MemoryBuffer *inputTil
xm = x - i;
xp = x + i;
tbuf1->read(c, x, y);
- c[0]*=f1; c[1]*=f1 ; c[2] *=f1;
+ mul_v3_fl(c, f1);
tbuf1->read(tc, (settings->angle ? xm : x), ym);
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
tbuf1->read(tc, (settings->angle ? xp : x), yp);
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
c[3] = 1.0f;
tbuf1->writePixel(x, y, c);
tbuf2->read(c, x, y);
- c[0]*=f1; c[1]*=f1 ; c[2] *=f1;
+ mul_v3_fl(c, f1);
tbuf2->read(tc, xm, (settings->angle ? yp : y));
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
tbuf2->read(tc, xp, (settings->angle ? ym : y));
- c[0]+=tc[0]*f2;
- c[1]+=tc[1]*f2;
- c[2]+=tc[2]*f2;
+ madd_v3_v3fl(c, tc, f2);
c[3] = 1.0f;
tbuf2->writePixel(x, y, c);
}