Calculate tangents for meshes