Text object render error.

Issue was caused by FLT_EPSILON being used to check for zero-sized faces, for
getting a reliable normal of front/backfaces of polygons. This value is too
small, giving occasional bad looking faces.

In other parts of code FLT_EPSILON10 was being used, that works much better.

Note for the future: here using doubles internally would be advised.
This commit is contained in:
Ton Roosendaal
2012-10-24 09:33:29 +00:00
parent 6d79568f66
commit c9e489b53b

View File

@@ -2884,8 +2884,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
vlr->v2= RE_findOrAddVert(obr, startvert+index[1]);
vlr->v3= RE_findOrAddVert(obr, startvert+index[2]);
vlr->v4= NULL;
if (area_tri_v3(vlr->v3->co, vlr->v2->co, vlr->v1->co)>FLT_EPSILON) {
if (area_tri_v3(vlr->v3->co, vlr->v2->co, vlr->v1->co)>FLT_EPSILON10) {
normal_tri_v3(tmp, vlr->v3->co, vlr->v2->co, vlr->v1->co);
add_v3_v3(n, tmp);
}