Fix texture UV values for obj models. Closes #9737 (#9767)

This commit is contained in:
Lupicus authored and GitHub committed 2023-11-10 15:56:38 -08:00
1 parent dff52ecd71
commit 7cd88944d4
2 files changed
+4 -4

No files matched your search

@@ -424,8 +424,8 @@ public class ObjModel extends SimpleUnbakedGeometry<ObjModel>
quadBaker.vertex(position.x(), position.y(), position.z());
quadBaker.color(tintedColor.x(), tintedColor.y(), tintedColor.z(), tintedColor.w());
quadBaker.uv(
texture.getU(texCoord.x * 16),
texture.getV((flipV ? 1 - texCoord.y : texCoord.y) * 16)
texture.getU(texCoord.x),
texture.getV((flipV ? 1 - texCoord.y : texCoord.y))
);
quadBaker.uv2(uv2);
quadBaker.normal(normal.x(), normal.y(), normal.z());
@@ -27,11 +27,11 @@ public class UnitTextureAtlasSprite extends TextureAtlasSprite {
@Override
public float getU(float u) {
return u / 16;
return u;
}
@Override
public float getV(float v) {
return v / 16;
return v;
}
}