diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-31 16:51:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-31 16:58:00 +0300 |
commit | 5d502264daece51f11a9906fa5c3e60240e1fc95 (patch) | |
tree | 55c9d63415155d822a6d710571e9eec749e00c16 /source/blender/compositor/operations | |
parent | f9688d88ff528e94e0ac059c6fc41a163fb0f6be (diff) |
Compositor: Don't let HSV correction to output negative colors
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_ConvertOperation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp index 6b3e4067b18..1445b78552f 100644 --- a/source/blender/compositor/operations/COM_ConvertOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp @@ -292,6 +292,9 @@ void ConvertHSVToRGBOperation::executePixelSampled(float output[4], float x, flo float inputColor[4]; this->m_inputOperation->readSampled(inputColor, x, y, sampler); hsv_to_rgb_v(inputColor, output); + output[0] = max_ff(output[0], 0.0f); + output[1] = max_ff(output[1], 0.0f); + output[2] = max_ff(output[2], 0.0f); output[3] = inputColor[3]; } |