tools: Clarify some comments

This commit is contained in:
Antonio Niño Díaz 2024-01-01 03:50:16 +01:00
parent 2ec91e1100
commit f885f25bfb
2 changed files with 4 additions and 3 deletions

View File

@ -666,7 +666,8 @@ def convert_md5mesh(model_file, name, output_folder, texture_size,
# -------
st = vert.st
# In the MD5 format (0, 0) is the top-left corner, same as what
# the GPU of the DS expects.
u = st[0] * texture_size[0]
v = st[1] * texture_size[1]
dl.texcoord(u, v)

View File

@ -130,8 +130,8 @@ def convert_obj(input_file, output_file, texture_size,
if texcoord_index is not None:
u, v = texcoords[texcoord_index]
# On OBJ, (0, 0) is the bottom-left corner. On the DS, (0, 0) is
# the top left corner. This flips the top and the bottom.
# In the OBJ format (0, 0) is the bottom-left corner. In the DS,
# (0, 0) is the top left corner. We need tp flip top and bottom.
v = 1.0 - v
u *= texture_size[0]
v *= texture_size[1]