diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-05 16:54:32 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-05 18:56:14 +0300 |
commit | ba5961b4cda402389c7c3092a1bd092d9fd98bb2 (patch) | |
tree | 15555e3498e828e55230bb2d7ae4b1225596506a /source/blender/compositor/operations/COM_ChannelMatteOperation.cpp | |
parent | 3d3a5bb89240ef160d2a63da85eae937eb578e53 (diff) |
Cleanup: use MIN2/MAX2 in compositor.
Diffstat (limited to 'source/blender/compositor/operations/COM_ChannelMatteOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ChannelMatteOperation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp index a2c6fd47771..15375589888 100644 --- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp @@ -95,7 +95,7 @@ void ChannelMatteOperation::executePixelSampled(float output[4], this->m_inputImageProgram->readSampled(inColor, x, y, sampler); /* matte operation */ - alpha = inColor[this->m_ids[0]] - max(inColor[this->m_ids[1]], inColor[this->m_ids[2]]); + alpha = inColor[this->m_ids[0]] - MAX2(inColor[this->m_ids[1]], inColor[this->m_ids[2]]); /* flip because 0.0 is transparent, not 1.0 */ alpha = 1.0f - alpha; @@ -116,5 +116,5 @@ void ChannelMatteOperation::executePixelSampled(float output[4], */ /* Don't make something that was more transparent less transparent. */ - output[0] = min(alpha, inColor[3]); + output[0] = MIN2(alpha, inColor[3]); } |