[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50012] branches/soc-2012-bratwurst/source /blender/blenlib/intern/math_color.c: fix for incorrect clamping for rgb_invert() function

Campbell Barton ideasman42 at gmail.com
Sun Aug 19 13:51:58 CEST 2012


Revision: 50012
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50012
Author:   campbellbarton
Date:     2012-08-19 11:51:58 +0000 (Sun, 19 Aug 2012)
Log Message:
-----------
fix for incorrect clamping for rgb_invert() function

Modified Paths:
--------------
    branches/soc-2012-bratwurst/source/blender/blenlib/intern/math_color.c

Modified: branches/soc-2012-bratwurst/source/blender/blenlib/intern/math_color.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/blenlib/intern/math_color.c	2012-08-19 11:29:25 UTC (rev 50011)
+++ branches/soc-2012-bratwurst/source/blender/blenlib/intern/math_color.c	2012-08-19 11:51:58 UTC (rev 50012)
@@ -658,9 +658,9 @@
 void rgb_invert(float col[3])
 {
 	/* clamp to avoid negative values especially for hdr */
-	col[0] = 1.0 - maxf(col[0], 1.0);
-	col[1] = 1.0 - maxf(col[1], 1.0);
-	col[2] = 1.0 - maxf(col[2], 1.0);
+	col[0] = 1.0 - minf(col[0], 1.0);
+	col[1] = 1.0 - minf(col[1], 1.0);
+	col[2] = 1.0 - minf(col[2], 1.0);
 }
 
 void rgb_invert_uchar(unsigned char col[3])




More information about the Bf-blender-cvs mailing list