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-15 22:42:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-15 22:42:03 +0400
commit570cc70772d78703053956ce57b20c6c4ed74c95 (patch)
treeb4c5db0392384251f1b1ccefc17c959d3e742977 /source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
parent8fd2267e56d3d0b6bb860800eb8059bcbfa0b501 (diff)
style cleanup: compositor operations
Diffstat (limited to 'source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index f206bf4df8e..6e8aa9461e6 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -22,7 +22,7 @@
#include "COM_LuminanceMatteOperation.h"
#include "BLI_math.h"
-LuminanceMatteOperation::LuminanceMatteOperation(): NodeOperation()
+LuminanceMatteOperation::LuminanceMatteOperation() : NodeOperation()
{
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
@@ -44,26 +44,26 @@ void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y,
{
float inColor[4];
- const float high=this->settings->t1;
- const float low=this->settings->t2;
+ const float high = this->settings->t1;
+ const float low = this->settings->t2;
float alpha;
this->inputImageProgram->read(inColor, x, y, sampler, inputBuffers);
/* one line thread-friend algorithm:
- outputValue[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
- */
+ * outputValue[0] = max(inputValue[3], min(high, max(low, ((inColor[0]-low)/(high-low))))
+ */
/* test range*/
if (inColor[0] > high) {
- alpha=1.f;
+ alpha = 1.f;
}
else if (inColor[0] < low) {
- alpha=0.f;
+ alpha = 0.f;
}
- else {/*blend */
- alpha=(inColor[0]-low)/(high-low);
+ else { /*blend */
+ alpha = (inColor[0] - low) / (high - low);
}
@@ -72,12 +72,12 @@ void LuminanceMatteOperation::executePixel(float *outputValue, float x, float y,
*/
/* don't make something that was more transparent less transparent */
- if (alpha<inColor[3]) {
- outputValue[0]=alpha;
+ if (alpha < inColor[3]) {
+ outputValue[0] = alpha;
}
else {
- /* leave now it was before */
- outputValue[0]=inColor[3];
+ /* leave now it was before */
+ outputValue[0] = inColor[3];
}
}