Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-01-29 17:46:39 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-01-29 17:46:49 +0300
commit7ce7cb5e0ff54b28581c4f02e8837ba6a88f7005 (patch)
tree963fbca63e40c5c65ea0710493316e5a752f7631 /source
parent6912fe132fbd37422ab62938cf2e823821cbbb2a (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 8abffa17168..34a10963050 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);