[Bf-blender-cvs] [5d50226] master: Compositor: Don't let HSV correction to output negative colors

Sergey Sharybin noreply at git.blender.org
Fri Oct 31 14:57:44 CET 2014


Commit: 5d502264daece51f11a9906fa5c3e60240e1fc95
Author: Sergey Sharybin
Date:   Fri Oct 31 14:51:59 2014 +0100
Branches: master
https://developer.blender.org/rB5d502264daece51f11a9906fa5c3e60240e1fc95

Compositor: Don't let HSV correction to output negative colors

===================================================================

M	source/blender/compositor/operations/COM_ConvertOperation.cpp

===================================================================

diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp
index 6b3e406..1445b78 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];
 }




More information about the Bf-blender-cvs mailing list