Browse Source

Fixed texture seams and bleeding caused by making our UVs one texel too large

master
Nico de Poel 3 years ago
parent
commit
beb1ad6382
  1. 4
      main.cpp

4
main.cpp

@ -181,8 +181,8 @@ int process_faces(const world_t* world, const std::vector<ps1bsp_texture_t>& 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);
}

Loading…
Cancel
Save