[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50972] trunk/blender/source/blender/ compositor/operations/COM_MixColorOperation.cpp: fix [#32709] Color mix node produces artifacts from other frames

Campbell Barton ideasman42 at gmail.com
Mon Oct 1 08:34:02 CEST 2012


Revision: 50972
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50972
Author:   campbellbarton
Date:     2012-10-01 06:34:02 +0000 (Mon, 01 Oct 2012)
Log Message:
-----------
fix [#32709] Color mix node produces artifacts from other frames

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp

Modified: trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp	2012-10-01 06:18:45 UTC (rev 50971)
+++ trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp	2012-10-01 06:34:02 UTC (rev 50972)
@@ -53,10 +53,13 @@
 		float tmpr, tmpg, tmpb;
 		rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
 		hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
-		output[0] = valuem * (inputColor1[0]) + value * tmpr;
-		output[1] = valuem * (inputColor1[1]) + value * tmpg;
-		output[2] = valuem * (inputColor1[2]) + value * tmpb;
+		output[0] = (valuem * inputColor1[0]) + (value * tmpr);
+		output[1] = (valuem * inputColor1[1]) + (value * tmpg);
+		output[2] = (valuem * inputColor1[2]) + (value * tmpb);
 	}
+	else {
+		copy_v3_v3(output, inputColor1);
+	}
 	output[3] = inputColor1[3];
 
 	clampIfNeeded(output);




More information about the Bf-blender-cvs mailing list