Fix scaling for 16-bit UVs

This commit is contained in:
Henrik Rydgard 2012-11-16 17:19:28 +01:00
parent 4c1ae9e81c
commit ba171c8360
2 changed files with 3 additions and 3 deletions

View file

@ -496,7 +496,7 @@ void TransformAndDrawPrim(void *verts, void *inds, int prim, int vertexCount, Li
trans->x = saved.x;
trans->uv[0] = saved.uv[0];
trans++;
// bottom left
*trans = transVtx;
trans->y = saved.y;

View file

@ -216,8 +216,8 @@ void VertexDecoder::DecodeVerts(DecodedVertex *decoded, const void *verts, const
}
else
{
uv[0] = (float)uvdata[0] / 65535.0f;
uv[1] = (float)uvdata[1] / 65535.0f;
uv[0] = (float)uvdata[0] / 32768.0f;
uv[1] = (float)uvdata[1] / 32768.0f;
}
}
break;