From 356f5788e1c872154fc2ca13c6ff8dc203a7d16d Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 8 Feb 2013 00:04:01 +0100 Subject: [PATCH] Fix more UV issues --- GPU/GLES/VertexDecoder.cpp | 4 ++-- GPU/GLES/VertexShaderGenerator.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index e00692730..8bfc77a45 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -178,8 +178,8 @@ void VertexDecoder::Step_TcFloatThrough() const { float *uv = (float *)(decoded_ + decFmt.uvoff); const float *uvdata = (const float*)(ptr_ + tcoff); - uv[0] = uvdata[0]; - uv[1] = uvdata[1]; + uv[0] = uvdata[0] * 0.5f; + uv[1] = uvdata[1] * 0.5f; } void VertexDecoder::Step_Color565() const diff --git a/GPU/GLES/VertexShaderGenerator.cpp b/GPU/GLES/VertexShaderGenerator.cpp index 699b5dbe4..d6cc3770c 100644 --- a/GPU/GLES/VertexShaderGenerator.cpp +++ b/GPU/GLES/VertexShaderGenerator.cpp @@ -375,7 +375,7 @@ void GenerateVertexShader(int prim, char *buffer) { WRITE(p, " vec3 temp_tc = a_position.xyz;\n"); break; case 1: // Use unscaled UV as source - WRITE(p, " vec3 temp_tc = vec3(a_texcoord.xy, 0.0);\n"); + WRITE(p, " vec3 temp_tc = vec3(a_texcoord.xy * 2.0f, 0.0);\n"); break; case 2: // Use normalized transformed normal as source WRITE(p, " vec3 temp_tc = normalize(a_normal);\n");