diff options
Diffstat (limited to 'source/blender/blenkernel/intern/brush.cc')
-rw-r--r-- | source/blender/blenkernel/intern/brush.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 99733c8edb3..5838ef1cbbe 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -2512,8 +2512,10 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool if (display_gradient || have_texture) { for (int i = 0; i < side; i++) { for (int j = 0; j < side; j++) { - float magn = sqrtf(pow2f(i - half) + pow2f(j - half)); - im->rect_float[i * side + j] *= BKE_brush_curve_strength_clamped(br, magn, half); + const float magn = sqrtf(pow2f(i - half) + pow2f(j - half)); + const float strength = BKE_brush_curve_strength_clamped(br, magn, half); + im->rect_float[i * side + j] = (have_texture) ? im->rect_float[i * side + j] * strength : + strength; } } } |