[Bf-blender-cvs] [7ce7cb5] master: Fix T43454 color is washed out in textured brushes
Antony Riakiotakis
noreply at git.blender.org
Thu Jan 29 15:47:01 CET 2015
Commit: 7ce7cb5e0ff54b28581c4f02e8837ba6a88f7005
Author: Antony Riakiotakis
Date: Thu Jan 29 15:46:39 2015 +0100
Branches: master
https://developer.blender.org/rB7ce7cb5e0ff54b28581c4f02e8837ba6a88f7005
Fix T43454 color is washed out in textured brushes
Yet another color space issue, we multiplied texture color with srgb
brush color and retrasnformed it to srgb. Now use the linear brush color
for the multiplication.
===================================================================
M source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 8abffa1..34a1096 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4161,13 +4161,14 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, const
float rgb[3];
unsigned char rgba_ub[4];
- copy_v3_v3(rgb, ps->paint_color);
-
if (ps->is_texbrush) {
- mul_v3_v3(rgb, texrgb);
+ mul_v3_v3v3(rgb, texrgb, ps->paint_color_linear);
/* TODO(sergey): Support texture paint color space. */
linearrgb_to_srgb_v3_v3(rgb, rgb);
}
+ else {
+ copy_v3_v3(rgb, ps->paint_color);
+ }
rgb_float_to_uchar(rgba_ub, rgb);
rgba_ub[3] = f_to_char(mask);
More information about the Bf-blender-cvs
mailing list