diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ChannelMatteOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ChannelMatteOperation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp index 3faffc1e3ff..688cbe91cf7 100644 --- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp @@ -101,10 +101,10 @@ void ChannelMatteOperation::executePixelSampled(float output[4], float x, float /* matte operation */ alpha = inColor[this->m_ids[0]] - max(inColor[this->m_ids[1]], inColor[this->m_ids[2]]); - + /* flip because 0.0 is transparent, not 1.0 */ alpha = 1.0f - alpha; - + /* test range */ if (alpha > limit_max) { alpha = inColor[3]; /*whatever it was prior */ @@ -119,7 +119,7 @@ void ChannelMatteOperation::executePixelSampled(float output[4], float x, float /* store matte(alpha) value in [0] to go with * COM_SetAlphaOperation and the Value output */ - + /* don't make something that was more transparent less transparent */ output[0] = min(alpha, inColor[3]); } |