Fix T44390: Clay brush weirdness part-2
Use the normal of the plane instead of the vertex normal, since projecting using the vertex normal frequently causes artifacts.
This commit is contained in:
parent
05b6de545a
commit
3a4a2a9427
Notes:
blender-bot
2023-06-07 10:31:13 +02:00
Referenced by issue #44390, Clay brush weirdness
|
@ -2645,8 +2645,10 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
|
|||
sub_v3_v3v3(val, intr, vd.co);
|
||||
|
||||
if (plane_trim(ss->cache, brush, val)) {
|
||||
/* note, the normal from the vertices is ignored,
|
||||
* causes glitch with planes, see: T44390 */
|
||||
const float fade = bstrength * tex_strength(ss, brush, vd.co, sqrtf(test.dist),
|
||||
vd.no, vd.fno, vd.mask ? *vd.mask : 0.0f);
|
||||
NULL, an, vd.mask ? *vd.mask : 0.0f);
|
||||
|
||||
mul_v3_v3fl(proxy[vd.i], val, fade);
|
||||
|
||||
|
@ -2746,9 +2748,11 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
|
|||
sub_v3_v3v3(val, intr, vd.co);
|
||||
|
||||
if (plane_trim(ss->cache, brush, val)) {
|
||||
/* note, the normal from the vertices is ignored,
|
||||
* causes glitch with planes, see: T44390 */
|
||||
const float fade = bstrength * tex_strength(ss, brush, vd.co,
|
||||
ss->cache->radius * test.dist,
|
||||
vd.no, vd.fno, vd.mask ? *vd.mask : 0.0f);
|
||||
NULL, an, vd.mask ? *vd.mask : 0.0f);
|
||||
|
||||
mul_v3_v3fl(proxy[vd.i], val, fade);
|
||||
|
||||
|
|
Loading…
Reference in New Issue