Change the texture coords in the mesh and not in the shader.
sizeX = lenght of the plane on X
xizeY = lenght of the plane on Y
texX and texY is some sort of coef that i was playing arround.
public Plane(float sizeX, float sizeY, float texX, float texY){
sizeX/=2.0f;
sizeY/=2.0f;
mesh = new Mesh(true, 4, 6,
new VertexAttribute(Usage.Position, 3, "a_position"),
new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoord"));
mesh.setVertices(new float[] {-sizeX, -sizeY, 0f, 0f, texY, //bottom-left
sizeX, -sizeY, 0f, texX, texY, //bottom-right
sizeX, sizeY, 0f, texX, 0f, //top-right
-sizeX, sizeY, 0f, 0f, 0f}); //top-left
mesh.setIndices(new short[] { 0, 1, 2, 3, 0, 2 });
I dont remenber exactly how this was done, check some terrain texturing tuts.
The usage thing is like a label to tell the functionality of that attribute, Ive never needed it. It may be usefull for some Libgdx wrappers.