mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Fix the messed up UVs.
I had forgotten to invert the t axis.
This commit is contained in:
parent
a80eef8bc4
commit
a1d9e752cd
1 changed files with 3 additions and 1 deletions
|
@ -114,8 +114,10 @@ def build_tris(mesh):
|
|||
def convert_stverts(mdl, stverts):
|
||||
for i, st in enumerate (stverts):
|
||||
s, t = st
|
||||
# quake textures are top to bottom, but blender images
|
||||
# are bottom to top
|
||||
s = int (s * mdl.skinwidth + 0.5)
|
||||
t = int (t * mdl.skinheight + 0.5)
|
||||
t = int ((1 - t) * mdl.skinheight + 0.5)
|
||||
# ensure st is within the skin
|
||||
s = ((s % mdl.skinwidth) + mdl.skinwidth) % mdl.skinwidth
|
||||
t = ((t % mdl.skinheight) + mdl.skinheight) % mdl.skinheight
|
||||
|
|
Loading…
Reference in a new issue