Wire render normals were exactly opposite to the normals for solid faces.
This caused displacement to work inverse too. Flipped them.
(Note; for shading normals are corrected to point towards viewer)
This commit is contained in:
Ton Roosendaal 2006-04-09 17:14:55 +00:00
parent 5dd21d368f
commit de3a622095

@ -1843,9 +1843,9 @@ static void init_render_mesh(Render *re, Object *ob, int only_verts)
use_mesh_edge_lookup(re, me, dlm, medge, vlr, edgetable, totedge); use_mesh_edge_lookup(re, me, dlm, medge, vlr, edgetable, totedge);
} }
xn= (v0->no[0]+v1->no[0]); xn= -(v0->no[0]+v1->no[0]);
yn= (v0->no[1]+v1->no[1]); yn= -(v0->no[1]+v1->no[1]);
zn= (v0->no[2]+v1->no[2]); zn= -(v0->no[2]+v1->no[2]);
/* transpose ! */ /* transpose ! */
vlr->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn; vlr->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
vlr->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn; vlr->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;