Mesh/MeshParams: Replace flipUVs by texCoordOffset and texCoordScale

This commit is contained in:
Lynix
2016-11-24 09:43:56 +01:00
parent 3ae5bfad63
commit 0c8128b7e4
6 changed files with 52 additions and 62 deletions

View File

@@ -265,8 +265,8 @@ namespace Nz
if (vertexIndices.texCoord > 0)
{
const Vector3f& uvw = texCoords[vertexIndices.texCoord-1];
vertex.uv.Set(uvw.x, (parameters.flipUVs) ? 1.f - uvw.y : uvw.y); // Inversion des UVs si demandé
Vector2f uv = texCoords[vertexIndices.texCoord - 1];
vertex.uv.Set(parameters.texCoordOffset + uv * parameters.texCoordScale);
}
else
hasTexCoords = false;