diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-16 19:51:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-16 19:51:52 +0400 |
commit | 103f665c593dc53850aaabf4fbe019f3375e10ae (patch) | |
tree | f2d8d5798d9d40f8ae9ea2ec7ad9798197008536 /source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp | |
parent | 4dacad06a94dae1165427a6664c67591415e9594 (diff) |
code cleanup: make names more logical
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp index 12ebfbe1562..10b651a4f05 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp @@ -110,7 +110,7 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, Memor int bufferindex = ((minx - bufferstartx) * 4) + ((miny - bufferstarty) * 4 * bufferwidth); /* gauss */ - float tempColor = 0.0f; + float alpha_accum = 0.0f; float multiplier_accum = 0.0f; /* dilate */ @@ -125,30 +125,25 @@ void GaussianAlphaXBlurOperation::executePixel(float *color, int x, int y, Memor /* gauss */ { multiplier = gausstab[index]; - tempColor += value * multiplier; + alpha_accum += value * multiplier; multiplier_accum += multiplier; } /* dilate - find most extreme color */ if (value > value_max) { -#if 0 - multiplier = 1.0f - ((fabsf(x - nx)) / (float)this->rad); -#else multiplier = distbuf_inv[index]; -#endif value *= multiplier; if (value > value_max) { value_max = value; distfacinv_max = multiplier; } } - bufferindex += offsetadd; } /* blend between the max value and gauss blue - gives nice feather */ - const float value_gauss = tempColor / multiplier_accum; - const float value_final = (value_max * distfacinv_max) + (value_gauss * (1.0f - distfacinv_max)); + const float value_blur = alpha_accum / multiplier_accum; + const float value_final = (value_max * distfacinv_max) + (value_blur * (1.0f - distfacinv_max)); color[0] = finv_test(value_final, do_invert); } |