Float TC coordinates apparently work in through mode. Add one more special case for blending.

This commit is contained in:
Henrik Rydgard committed 2012-11-26 11:34:23 +01:00
1 parent 00c218860e
commit ec55fac3cd
3 files changed
+17 -4

No files matched your search

+8 -3
View File
@@ -190,7 +190,7 @@ void VertexDecoder::DecodeVerts(DecodedVertex *decoded, const void *verts, const
{
const u8 *uvdata = (const u8*)(ptr + tcoff);
for (int j = 0; j < 2; j++)
uv[j] = (float)uvdata[j]/255.0f;
uv[j] = (float)uvdata[j] / 255.0f;
break;
}
@@ -213,8 +213,13 @@ void VertexDecoder::DecodeVerts(DecodedVertex *decoded, const void *verts, const
case GE_VTYPE_TC_FLOAT:
{
const float *uvdata = (const float*)(ptr + tcoff);
for (int j = 0; j < 2; j++)
uv[j] = uvdata[j];
if (throughmode) {
uv[0] = uvdata[0] / (float)(gstate_c.curTextureWidth);
uv[1] = uvdata[1] / (float)(gstate_c.curTextureHeight);
} else {
uv[0] = uvdata[0];
uv[1] = uvdata[1];
}
}
break;
}