From ba171c836093c6e0bf6adce30869506751c0ffda Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 16 Nov 2012 17:19:28 +0100 Subject: [PATCH] Fix scaling for 16-bit UVs --- GPU/GLES/TransformPipeline.cpp | 2 +- GPU/GLES/VertexDecoder.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index cd948c8aca..4d3d25a4cb 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -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; diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index c091fa3c56..ef6104fd63 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -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;