mirror of https://github.com/bjornbytes/lovr.git
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:
parent
2dcba24138
commit
072452a4da
|
@ -49,8 +49,8 @@ static void parseMtl(char* path, char* base, ModelDataIO* io, arr_image_t* image
|
||||||
arr_push(materials, ((ModelMaterial) {
|
arr_push(materials, ((ModelMaterial) {
|
||||||
.color = { 1.f, 1.f, 1.f, 1.f },
|
.color = { 1.f, 1.f, 1.f, 1.f },
|
||||||
.glow = { 0.f, 0.f, 0.f, 1.f },
|
.glow = { 0.f, 0.f, 0.f, 1.f },
|
||||||
.uvShift = { 0.f, 0.f },
|
.uvShift = { 0.f, 1.f },
|
||||||
.uvScale = { 1.f, 1.f },
|
.uvScale = { 1.f, -1.f },
|
||||||
.metalness = 1.f,
|
.metalness = 1.f,
|
||||||
.roughness = 1.f,
|
.roughness = 1.f,
|
||||||
.clearcoat = 0.f,
|
.clearcoat = 0.f,
|
||||||
|
|
Loading…
Reference in New Issue