Revision: 37165
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37165
Author: jwilkins
Date: 2011-06-04 06:03:15 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
* made paint mask red
* will make it a userpref myself if there is not a revision coming up that does
so
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
Modified: branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
2011-06-04 05:45:05 UTC (rev 37164)
+++ branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
2011-06-04 06:03:15 UTC (rev 37165)
@@ -444,10 +444,9 @@
convert the mask strength to RGB-bytes */
static void mask_to_gpu_colors(unsigned char out[3], float mask_strength)
{
- unsigned char v = (unsigned char)(mask_strength * 127.0f);
- out[0] = v;
- out[1] = v;
- out[2] = v;
+ out[0] = (unsigned char)(mask_strength*127.0f +
(1.0f-mask_strength)*1.00*127.0f);
+ out[1] = (unsigned char)(mask_strength*127.0f +
(1.0f-mask_strength)*0.39*127.0f);
+ out[2] = (unsigned char)(mask_strength*127.0f +
(1.0f-mask_strength)*0.39*127.0f);
}
/* Create or destroy the color buffer as needed, return a pointer to the color
buffer data.
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs