diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-03-21 14:08:38 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-03-21 14:08:38 +0300 |
commit | 15d8262ec439c866dc56d51014ca150046709e3e (patch) | |
tree | 56b57857899bfbb5b88dac0ecc5da4a084aea342 /source | |
parent | 479b0362ccfca6413ff795591c6199a18aee0b6f (diff) |
Connect brush strength and blend mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc b/source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc index 804b04f6082..ef7e3a1027b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc +++ b/source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc @@ -29,6 +29,7 @@ #include "BLI_vector.hh" #include "IMB_colormanagement.h" +#include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf_wrappers.hh" @@ -173,8 +174,11 @@ template<typename ImagePixelAccessor> class PaintingKernel { mask, triangle.automasking_factor, thread_id); - - blend_color_interpolate_float(color, color, brush_color, falloff_strength * brush_strength); + float4 paint_color = brush_color * falloff_strength * brush_strength; + float4 buffer_color; + blend_color_mix_float(buffer_color, color, paint_color); + buffer_color *= brush->alpha; + IMB_blend_color_float(color, color, buffer_color, static_cast<IMB_BlendMode>(brush->blend)); image_accessor.store_pixel(image_buffer, color); pixels_painted = true; |