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-08-10 18:07:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-10 18:07:24 +0400
commit94a3945cf9de0913b75f83b26e2e62b3bc1b0c07 (patch)
tree89aeabd20d883137b69815d9580f3bc108531a7e /source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
parente8772477894a6fd8c09488b488fdcc1af432da1b (diff)
code cleanup: compositor - define size for executePixel function output float array
Diffstat (limited to 'source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index a95d1eec290..e23eb26f527 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -44,7 +44,7 @@ void DifferenceMatteOperation::deinitExecution()
this->m_inputImage2Program = NULL;
}
-void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler)
+void DifferenceMatteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
float inColor1[4];
float inColor2[4];
@@ -66,7 +66,7 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
/* make 100% transparent */
if (difference < tolerance) {
- outputValue[0] = 0.0f;
+ output[0] = 0.0f;
}
/*in the falloff region, make partially transparent */
else if (difference < falloff + tolerance) {
@@ -74,15 +74,15 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
alpha = difference / falloff;
/*only change if more transparent than before */
if (alpha < inColor1[3]) {
- outputValue[0] = alpha;
+ output[0] = alpha;
}
else { /* leave as before */
- outputValue[0] = inColor1[3];
+ output[0] = inColor1[3];
}
}
else {
/* foreground object */
- outputValue[0] = inColor1[3];
+ output[0] = inColor1[3];
}
}