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:
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index aaf5f92505b..af15f719cbc 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -55,8 +55,7 @@ void GaussianAlphaXBlurOperation::initExecution()
if (this->m_sizeavailable) {
float rad = this->m_size * this->m_data->sizex;
- if (rad < 1)
- rad = 1;
+ CLAMP(rad, 1.0f, MAX_GAUSSTAB_RADIUS);
this->m_rad = rad;
this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
@@ -69,8 +68,7 @@ void GaussianAlphaXBlurOperation::updateGauss()
if (this->m_gausstab == NULL) {
updateSize();
float rad = this->m_size * this->m_data->sizex;
- if (rad < 1)
- rad = 1;
+ CLAMP(rad, 1.0f, MAX_GAUSSTAB_RADIUS);
this->m_rad = rad;
this->m_gausstab = BlurBaseOperation::make_gausstab(rad);
@@ -79,8 +77,7 @@ void GaussianAlphaXBlurOperation::updateGauss()
if (this->m_distbuf_inv == NULL) {
updateSize();
float rad = this->m_size * this->m_data->sizex;
- if (rad < 1)
- rad = 1;
+ CLAMP(rad, 1.0f, MAX_GAUSSTAB_RADIUS);
this->m_rad = rad;
this->m_distbuf_inv = BlurBaseOperation::make_dist_fac_inverse(rad, this->m_falloff);