diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-15 06:58:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-15 06:58:06 +0400 |
commit | e6e265b2b59e02cc7816a2ed43471eca8bca0a62 (patch) | |
tree | e312d2c2f6cb1aaf79148648e5725902ab23d34e /source/blender/nodes/composite/nodes/node_composite_glare.c | |
parent | e59ab6486f9e7285815671044b785c28365d5165 (diff) | |
parent | 3442c16c09b31a23f45b23be72e6eb5ba02c7bbf (diff) |
svn merge -r41779:41847 ^/trunk/blender
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_glare.c')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_glare.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c index b7cc1d3c92d..296ad2e3a5b 100644 --- a/source/blender/nodes/composite/nodes/node_composite_glare.c +++ b/source/blender/nodes/composite/nodes/node_composite_glare.c @@ -238,7 +238,7 @@ static void streaks(NodeGlare* ndg, CompBuf* dst, CompBuf* src) int x, y, n; unsigned int nump=0; fRGB c1, c2, c3, c4; - float a, ang = 360.f/(float)ndg->angle; + float a, ang = DEG2RADF(360.0f)/(float)ndg->angle; bsrc = BTP(src, ndg->threshold, 1 << ndg->quality); tsrc = dupalloc_compbuf(bsrc); // sample from buffer @@ -246,8 +246,8 @@ static void streaks(NodeGlare* ndg, CompBuf* dst, CompBuf* src) sbuf = alloc_compbuf(tsrc->x, tsrc->y, tsrc->type, 1); // streak sum buffer - for (a=0.f; a<360.f; a+=ang) { - const float an = (a + (float)ndg->angle_ofs)*(float)M_PI/180.f; + for (a=0.f; a<DEG2RADF(360.0f); a+=ang) { + const float an = a + ndg->angle_ofs; const float vx = cos((double)an), vy = sin((double)an); for (n=0; n<ndg->iter; ++n) { const float p4 = pow(4.0, (double)n); @@ -483,7 +483,7 @@ static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode* node, bNod ndg->mix = 0; ndg->threshold = 1; ndg->angle = 4; - ndg->angle_ofs = 0; + ndg->angle_ofs = 0.0f; ndg->fade = 0.9; ndg->size = 8; node->storage = ndg; |