Sculpt: Fix #106895: Brush textures broken for round brushes

This commit is contained in:
Joseph Eagar
2023-05-14 09:32:25 -07:00
parent d17f9f4872
commit eb15da661e

View File

@@ -3029,7 +3029,10 @@ static void calc_brush_local_mat(const float rotation,
/* Square tips should scale by square root of 2. */
if (BKE_brush_has_cube_tip(cache->brush, PAINT_MODE_SCULPT)) {
radius += (radius * M_SQRT2 - radius) * (1.0f - cache->brush->tip_roundness);
radius += (radius / M_SQRT2 - radius) * cache->brush->tip_roundness;
}
else {
radius /= M_SQRT2;
}
normalize_m4(mat);