Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-08-12 14:43:07 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-12 14:46:34 +0300
commit4d2e2a66912fc22f6092492b1450a5c110d1949d (patch)
tree13c8e3b9cebf2e97a65fb2d81a311c572a2032c9
parente0e4005582eae9dc1e0f110678a9280e66ea66f4 (diff)
Fix T100350: missing brush falloff preview in sculpt mode
-rw-r--r--source/blender/blenkernel/intern/brush.cc6
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;
}
}
}