diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 8 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 1a19341acec..5f4594703ee 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -275,6 +275,10 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size) if (is_texbrush) { brush_imbuf_tex_co(&tex_mapping, x, y, texco); BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool); + /* TODO(sergey): Support texture paint color space. */ + if (!use_float) { + linearrgb_to_srgb_v3_v3(rgba, rgba); + } mul_v3_v3(rgba, brush_rgb); } else { @@ -362,6 +366,10 @@ static void brush_painter_imbuf_update(BrushPainter *painter, ImBuf *oldtexibuf, if (is_texbrush) { brush_imbuf_tex_co(&tex_mapping, x, y, texco); BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool); + /* TODO(sergey): Support texture paint color space. */ + if (!use_float) { + linearrgb_to_srgb_v3_v3(rgba, rgba); + } mul_v3_v3(rgba, brush_rgb); } else { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 59f398a8719..fccd9cf0a19 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3758,8 +3758,9 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, const copy_v3_v3(rgb, ps->brush->rgb); if (ps->is_texbrush) { - /* XXX actually should convert texrgb from linear to srgb here */ mul_v3_v3(rgb, texrgb); + /* TODO(sergey): Support texture paint color space. */ + linearrgb_to_srgb_v3_v3(rgb, rgb); } rgb_float_to_uchar(rgba_ub, rgb); |