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 18:33:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 18:33:50 +0400
commite22aa7bc38c5d38a0714bed8a2a1869383cd5e5a (patch)
tree8ba360a657b3dee76a5e5126930037b5bc9e368f /source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
parent342fb0a19ef267de288086f3d0bb3c330a76d855 (diff)
style cleanup
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index e8def72b7da..4ca5f575cfe 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -15,15 +15,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Contributor:
- * Jeroen Bakker
+ * Contributor:
+ * Jeroen Bakker
* Monique Dewanchand
*/
#include "COM_GlareThresholdOperation.h"
#include "BLI_math.h"
-GlareThresholdOperation::GlareThresholdOperation(): NodeOperation()
+GlareThresholdOperation::GlareThresholdOperation() : NodeOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
@@ -37,13 +37,15 @@ void GlareThresholdOperation::initExecution()
void GlareThresholdOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
this->inputProgram->read(color, x, y, sampler, inputBuffers);
- if ((0.212671f*color[0] + 0.71516f*color[1] + 0.072169f*color[2]) >= threshold) {
+ if ((0.212671f * color[0] + 0.71516f * color[1] + 0.072169f * color[2]) >= threshold) {
color[0] -= threshold, color[1] -= threshold, color[2] -= threshold;
- color[0] = MAX2(color[0], 0.f);
- color[1] = MAX2(color[1], 0.f);
- color[2] = MAX2(color[2], 0.f);
+ color[0] = MAX2(color[0], 0.0f);
+ color[1] = MAX2(color[1], 0.0f);
+ color[2] = MAX2(color[2], 0.0f);
+ }
+ else {
+ zero_v3(color);
}
- else color[0] = color[1] = color[2] = 0.f;
}
void GlareThresholdOperation::deinitExecution()