diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareSimpleStarOperation.cpp | 40 |
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); } |