[Bf-blender-cvs] [15d8262ec43] temp-3d-texturing-brush-b: Connect brush strength and blend mode.

Jeroen Bakker noreply at git.blender.org
Mon Mar 21 12:08:43 CET 2022


Commit: 15d8262ec439c866dc56d51014ca150046709e3e
Author: Jeroen Bakker
Date:   Mon Mar 21 12:08:38 2022 +0100
Branches: temp-3d-texturing-brush-b
https://developer.blender.org/rB15d8262ec439c866dc56d51014ca150046709e3e

Connect brush strength and blend mode.

===================================================================

M	source/blender/editors/sculpt_paint/sculpt_texture_paint_d.cc

===================================================================

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;



More information about the Bf-blender-cvs mailing list