From fea07c1a63fdfe3bf25d77d862e83bdf024347b8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Mar 2016 09:13:16 +1100 Subject: Cleanup: unnecessary comma use Also use SWAP macro --- source/blender/compositor/operations/COM_GlareThresholdOperation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cpp') diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp index d2bd7cbeeab..f54e75a6b35 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp @@ -52,7 +52,10 @@ void GlareThresholdOperation::executePixelSampled(float output[4], float x, floa this->m_inputProgram->readSampled(output, x, y, sampler); if (IMB_colormanagement_get_luminance(output) >= threshold) { - output[0] -= threshold, output[1] -= threshold, output[2] -= threshold; + output[0] -= threshold; + output[1] -= threshold; + output[2] -= threshold; + output[0] = max(output[0], 0.0f); output[1] = max(output[1], 0.0f); output[2] = max(output[2], 0.0f); -- cgit v1.2.3