Sculpt: Allow inverting the Erase Displacement mesh filter

When inverting erase displacement the filter can increase the
displacement over the limit surface. After using apply base, this can be
used as an alternative intensify details as it usually gives better
results.

This is the same concept as smoothing inverting to intensify details.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9679
This commit is contained in:
Pablo Dobarro 2020-12-01 00:15:15 +01:00
parent 92e44ce67c
commit 1bc75dfa4a
1 changed files with 1 additions and 1 deletions

View File

@ -448,7 +448,7 @@ static void mesh_filter_task_cb(void *__restrict userdata,
mul_v3_v3fl(disp, ss->filter_cache->detail_directions[vd.index], -fabsf(fade));
} break;
case MESH_FILTER_ERASE_DISPLACEMENT: {
fade = clamp_f(fade, 0.0f, 1.0f);
fade = clamp_f(fade, -1.0f, 1.0f);
sub_v3_v3v3(disp, ss->filter_cache->limit_surface_co[vd.index], orig_co);
mul_v3_fl(disp, fade);
break;