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.
This commit is contained in:
parent
6912fe132f
commit
7ce7cb5e0f
Notes:
blender-bot
2023-02-14 09:33:13 +01:00
Referenced by issue #43847, Color difference when texpaint brush with/without texture. Referenced by issue #43454, Brush changes the tone color to choose a texture.
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue