Utility/OBJLoader: Fix OBJ uvs

This commit is contained in:
Lynix
2020-01-04 12:15:54 +01:00
parent df2a029f30
commit b3af14f65a
3 changed files with 3 additions and 4 deletions

View File

@@ -306,6 +306,8 @@ namespace Nz
if (vertexIndices.texCoord > 0)
{
Vector2f uv = Vector2f(texCoords[vertexIndices.texCoord - 1]);
uv.y = 1.f - uv.y; //< OBJ model texcoords seems to majority start from bottom left
uvPtr[index] = Vector2f(parameters.texCoordOffset + uv * parameters.texCoordScale);
}
else