Fix #109201: Consistent mapping boundaries of brush textures

This fix makes it so the circular brush is fitted into the square
texture. This seems to be the most straightforward way to resolve
confusion of the inter-dependencies between different brush and
texture options.

Pull Request: https://projects.blender.org/blender/blender/pulls/110896
This commit is contained in:
Sergey Sharybin
2023-08-09 11:39:58 +02:00
committed by Sergey Sharybin
parent 23835a393c
commit 8141ee90f4

View File

@@ -3007,14 +3007,6 @@ static void calc_brush_local_mat(const float rotation,
/* Scale by brush radius. */
float radius = cache->radius;
/* 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) * cache->brush->tip_roundness;
}
else {
radius /= M_SQRT2;
}
normalize_m4(mat);
scale_m4_fl(scale, radius);
mul_m4_m4m4(tmat, mat, scale);