Fix convertToLH for uv coordinates

Fix Collada export
Fix XFile export
This commit is contained in:
Madrich
2014-06-10 13:14:41 +02:00
parent c4021fbaaf
commit 272a59cd36
9 changed files with 112 additions and 29 deletions

View File

@@ -134,12 +134,22 @@ void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
{
pMesh->mVertices[a].z *= -1.0f;
if( pMesh->HasNormals())
pMesh->mNormals[a].z *= -1.0f;
pMesh->mNormals[a].z *= -1.0f;
if( pMesh->HasTangentsAndBitangents())
{
pMesh->mTangents[a].z *= -1.0f;
pMesh->mBitangents[a].z *= -1.0f;
}
// texture coords for all channels
for (unsigned int c = 0; c < pMesh->GetNumUVChannels(); c++)
{
if (pMesh->HasTextureCoords(c))
{
pMesh->mTextureCoords[c][a].y = 1.0f - pMesh->mTextureCoords[c][a].y;
}
}
}
// mirror offset matrices of all bones