Correct the texcoord conversion.

1.0 is to represent the last pixel, not one past it.
This commit is contained in:
Bill Currie 2012-05-20 08:51:15 +09:00
parent e2db2dcb63
commit f0285e5a08

View file

@ -171,8 +171,8 @@ sw_iqm_load_textures (iqm_t *iqm)
continue;
done_verts[vind / 8] |= (1 << (vind % 8));
*(int32_t *) (tc + 0) = *(float *) (tc + 0) * tex->width;
*(int32_t *) (tc + 4) = *(float *) (tc + 4) * tex->height;
*(int32_t *) (tc + 0) = *(float *) (tc + 0) * (tex->width - 1);
*(int32_t *) (tc + 4) = *(float *) (tc + 4) * (tex->height - 1);
}
}
dstring_delete (str);