Fix #27888: Render artifacts in 2.58.1
It was a regression introduced in rev36301. Average normal calcilation used to fail due to triangular faces which are too slight. Do not use triangles with too small area for average normal calculation.
This commit is contained in:
@@ -2932,8 +2932,10 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
|
||||
vlr->v3= RE_findOrAddVert(obr, startvert+index[2]);
|
||||
vlr->v4= NULL;
|
||||
|
||||
normal_tri_v3(tmp, vlr->v3->co, vlr->v2->co, vlr->v1->co);
|
||||
add_v3_v3(n, tmp);
|
||||
if(area_tri_v3(vlr->v3->co, vlr->v2->co, vlr->v1->co)>FLT_EPSILON) {
|
||||
normal_tri_v3(tmp, vlr->v3->co, vlr->v2->co, vlr->v1->co);
|
||||
add_v3_v3(n, tmp);
|
||||
}
|
||||
|
||||
vlr->mat= matar[ dl->col ];
|
||||
vlr->flag= 0;
|
||||
|
Reference in New Issue
Block a user