I'm in a left-handed system and for a quad with normal (0, 0, -1), my tangent comes out to (-1, 0, 0), and my binormal is (0, -1, 0). The UVs are mapped to the four corresponding corners of the texture, not inverted or anything like that.
Seems like tangent and binormal should be positive in this case, so I'm fishing around for hints to try and understand.
Thx,
Unfadable
D3DXVECTOR3 v2v1( m_vertices[indices[1]].x - m_vertices[indices[0]].x, m_vertices[indices[1]].y - m_vertices[indices[0]].y, m_vertices[indices[1]].z - m_vertices[indices[0]].z); D3DXVECTOR3 v3v1( m_vertices[indices[2]].x - m_vertices[indices[0]].x, m_vertices[indices[2]].y - m_vertices[indices[0]].y, m_vertices[indices[2]].z - m_vertices[indices[0]].z); float s1 = m_vertices[indices[1]].U - m_vertices[indices[0]].U; float s2 = m_vertices[indices[1]].V - m_vertices[indices[0]].V; float t1 = m_vertices[indices[2]].U - m_vertices[indices[0]].U; float t2 = m_vertices[indices[2]].V - m_vertices[indices[0]].V; float det = 1.f / (s1 * t2 - t1 * s2); D3DXVECTOR3 t = det * (v2v1*t2) - (v3v1*s2); D3DXVECTOR3 b = det * (-t1*v2v1) + (v3v1*s1);












