[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36927] branches/soc-2011-onion/source/ blender/blenkernel/intern/brush.c: de-gamma correct brush color before applying brush.

Ryakiotakis Antonis kalast at gmail.com
Thu May 26 17:04:41 CEST 2011


Revision: 36927
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36927
Author:   psy-fi
Date:     2011-05-26 15:04:41 +0000 (Thu, 26 May 2011)
Log Message:
-----------
de-gamma correct brush color before applying brush. Maybe this will fix problems with incorrect colors during painting

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c	2011-05-26 14:30:46 UTC (rev 36926)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/brush.c	2011-05-26 15:04:41 UTC (rev 36927)
@@ -562,9 +562,9 @@
 
 					brush_sample_tex(brush, xy, rgba, 0);
 
-					dstf[0] = rgba[0]*brush->rgb[0];
-					dstf[1] = rgba[1]*brush->rgb[1];
-					dstf[2] = rgba[2]*brush->rgb[2];
+					dstf[0] = rgba[0]*srgb_to_linearrgb(brush->rgb[0]);
+					dstf[1] = rgba[1]*srgb_to_linearrgb(brush->rgb[1]);
+					dstf[2] = rgba[2]*srgb_to_linearrgb(brush->rgb[2]);
 					dstf[3] = rgba[3]*alpha*brush_curve_strength_clamp(brush, dist, radius);
 				}
 			}




More information about the Bf-blender-cvs mailing list