Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_smooth.c
| Show First 20 Lines • Show All 309 Lines • ▼ Show 20 Lines | if (sculpt_brush_test_sq_fn(&test, vd.co)) { | ||||
| vd.co, | vd.co, | ||||
| sqrtf(test.dist), | sqrtf(test.dist), | ||||
| vd.no, | vd.no, | ||||
| vd.fno, | vd.fno, | ||||
| smooth_mask ? 0.0f : *vd.mask, | smooth_mask ? 0.0f : *vd.mask, | ||||
| vd.index, | vd.index, | ||||
| tls->thread_id); | tls->thread_id); | ||||
| if (smooth_mask) { | if (smooth_mask) { | ||||
| float val = SCULPT_neighbor_mask_average(ss, vd.vert_indices[vd.i]) - *vd.mask; | float val = SCULPT_neighbor_mask_average(ss, vd.index) - *vd.mask; | ||||
| val *= fade * bstrength; | val *= fade * bstrength; | ||||
| *vd.mask += val; | *vd.mask += val; | ||||
| CLAMP(*vd.mask, 0.0f, 1.0f); | CLAMP(*vd.mask, 0.0f, 1.0f); | ||||
| } | } | ||||
| else { | else { | ||||
| float avg[3], val[3]; | float avg[3], val[3]; | ||||
| SCULPT_bmesh_neighbor_average(avg, vd.bm_vert); | SCULPT_bmesh_neighbor_average(avg, vd.bm_vert); | ||||
| ▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines | |||||