Fix issue where OBJ UVs are upside down;

Most OBJ loaders use OpenGL texture coordinate conventions.

After switching to Vulkan, the UV origin became upper-left and images no
longer needed to be flipped on import.  This means that the OBJ importer
now needs to flip its UVs to compensate.  Somehow, no one noticed until
now!  Most people are using glTF I guess.
This commit is contained in:
bjorn 2023-07-29 03:37:18 -07:00
parent 2dcba24138
commit 072452a4da
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ static void parseMtl(char* path, char* base, ModelDataIO* io, arr_image_t* image
arr_push(materials, ((ModelMaterial) {
.color = { 1.f, 1.f, 1.f, 1.f },
.glow = { 0.f, 0.f, 0.f, 1.f },
.uvShift = { 0.f, 0.f },
.uvScale = { 1.f, 1.f },
.uvShift = { 0.f, 1.f },
.uvScale = { 1.f, -1.f },
.metalness = 1.f,
.roughness = 1.f,
.clearcoat = 0.f,