Sculpt: Avoid unnecessary sampled brush normal calculation

When applying a texture, the brush local matrix is required, but if
there is no active texture, the normal does not need to be computed.

Pull Request: https://projects.blender.org/blender/blender/pulls/137640
This commit is contained in:
Sean Kim
2025-04-17 21:29:05 +02:00
committed by Sean Kim
parent 82116aca2f
commit 9d94512f96

View File

@@ -831,7 +831,7 @@ static int sculpt_brush_needs_normal(const SculptSession &ss, const Sculpt &sd,
SCULPT_BRUSH_TYPE_ELASTIC_DEFORM,
SCULPT_BRUSH_TYPE_THUMB) ||
(mask_tex->brush_map_mode == MTEX_MAP_MODE_AREA)) ||
(mask_tex->tex && mask_tex->brush_map_mode == MTEX_MAP_MODE_AREA)) ||
brush_uses_topology_rake(ss, brush) || BKE_brush_has_cube_tip(&brush, PaintMode::Sculpt);
}