no need for subtracting here anymore

This commit is contained in:
Jupeyy 2017-10-09 19:44:22 +02:00
parent 26bd800d63
commit 5c25a7415d
2 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ void main()
gl_Position = vec4(Pos * VertPos, 0.0, 1.0);
float F1 = -(0.5/(1024.0 * pow(0.5, (LOD+1.0))));
float F2 = (0.5/(1024.0 * pow(0.5, (LOD+1.0))));
float tx = (inVertexTexCoord.x/(16.0)) - (inVertexTexRightOrBottom.x == 0 ? 0.0 : (1.0/1024.0));
float ty = (inVertexTexCoord.y/(16.0)) - (inVertexTexRightOrBottom.y == 0 ? 0.0 : (1.0/1024.0));
float tx = (inVertexTexCoord.x/(16.0));
float ty = (inVertexTexCoord.y/(16.0));
texCoord = vec2(tx + (inVertexTexRightOrBottom.x == 0 ? F2 : F1), ty + (inVertexTexRightOrBottom.y == 0 ? F2 : F1));
}

View file

@ -24,7 +24,7 @@ void main()
gl_Position = vec4(Pos * VertPos, 0.0, 1.0);
float F1 = -(0.5/(1024.0 * pow(0.5, (LOD+1.0))));
float F2 = (0.5/(1024.0 * pow(0.5, (LOD+1.0))));
float tx = (inVertexTexCoord.x/(16.0)) - (inVertexTexRightOrBottom.x == 0 ? 0.0 : (1.0/1024.0));
float ty = (inVertexTexCoord.y/(16.0)) - (inVertexTexRightOrBottom.y == 0 ? 0.0 : (1.0/1024.0));
float tx = (inVertexTexCoord.x/(16.0));
float ty = (inVertexTexCoord.y/(16.0));
texCoord = vec2(tx + (inVertexTexRightOrBottom.x == 0 ? F2 : F1), ty + (inVertexTexRightOrBottom.y == 0 ? F2 : F1));
}