From 48e0e0e2ac73b003056f9a1c7f392b73b8d3c10b Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 18 Dec 2020 14:40:37 +0100 Subject: Fix T83439: Sculpt: Radial symmetry combined with mirroring results in texture offsets Looks like this has been wrong since the introduction in rB5505697ac508 10 years ago. To get the proper texture lookup in the mirrored area, first rotate, then translate/flip [instead of the other way around]. Maniphest Tasks: T83439 Differential Revision: https://developer.blender.org/D9897 --- source/blender/editors/sculpt_paint/sculpt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8b586e60032..823213007b0 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2466,12 +2466,10 @@ float SCULPT_brush_strength_factor(SculptSession *ss, * across the symmetry axis and rotate it back to the original * position in order to project it. This insures that the * brush texture will be oriented correctly. */ - - flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass); - if (cache->radial_symmetry_pass) { - mul_m4_v3(cache->symm_rot_mat_inv, symm_point); + mul_m4_v3(cache->symm_rot_mat_inv, point); } + flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass); ED_view3d_project_float_v2_m4(cache->vc->region, symm_point, point_2d, cache->projection_mat); -- cgit v1.2.3