Fix T100350: missing brush falloff preview in sculpt mode

This commit is contained in:
Brecht Van Lommel 2022-08-12 13:43:07 +02:00
parent e0e4005582
commit 4d2e2a6691
Notes: blender-bot 2023-02-14 06:00:47 +01:00
Referenced by issue #100350, Regression: Sculpt mode strength Falloff Overlay not visible
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}
}
}