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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user