diff --git a/main.cpp b/main.cpp index ed7ab0e..8ff5307 100644 --- a/main.cpp +++ b/main.cpp @@ -181,8 +181,8 @@ int process_faces(const world_t* world, const std::vector& tex t = (t - minT) / (maxT - minT); // Rescale the UVs to the dimensions of the mipmap we've selected for our texture atlas - faceVertex.u = (unsigned char)(s * ps1tex.w); - faceVertex.v = (unsigned char)(t * ps1tex.h); + faceVertex.u = (unsigned char)(s * (ps1tex.w - 1)); + faceVertex.v = (unsigned char)(t * (ps1tex.h - 1)); outFaceVertices.push_back(faceVertex); }