Fix T100350: missing brush falloff preview in sculpt mode

This commit is contained in:
2022-08-12 13:43:07 +02:00
parent e0e4005582
commit 4d2e2a6691

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