Fix more UV issues

This commit is contained in:
Henrik Rydgard 2013-02-08 00:04:01 +01:00
parent 119d6955bd
commit 356f5788e1
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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");