n[1] = dv[0][2]*dv[1][0]-dv[0][0]*dv[1][2];
n[2] = dv[0][0]*dv[1][1]-dv[0][1]*dv[1][0];
*/
- n[0] = ((p1[0] + p1[1] + p1[2]) - (p0[0] + p0[1] + p0[2]));
- n[1] = ((p0[0] + p0[1] + p0[2]) - (p2[0] + p2[1] + p2[2]));
+ n[0] = ((p0[0] + p0[1] + p0[2]) - (p1[0] + p1[1] + p1[2]));
+ n[1] = ((p2[0] + p2[1] + p2[2]) - (p0[0] + p0[1] + p0[2]));
n[2] = ibumpscale;
VectorNormalize(n);
/*
f = -DotProduct(svector3f, normal3f);
VectorMA(svector3f, f, normal3f, svector3f);
VectorNormalize(svector3f);
- CrossProduct(svector3f, tvector3f, tangentcross);
+ CrossProduct(tvector3f, svector3f, tangentcross);
// if texture is mapped the wrong way (counterclockwise), the tangents have to be flipped, this is detected by calculating a normal from the two tangents, and seeing if it is opposite the surface normal
if (DotProduct(tangentcross, normal3f) < 0)
{