What is the correct way to put different textures on different parts of an object?
In vertex, put  vPos as varying. Then instead of doing the height check in vertex, do it in fragment.

if(outVPos.y &gt; 1.2) 
{
   textureColor = texture2D(urooftext, outTexCoords);
} 
else 
{
   discard;
}


By the way, varying qualifier is deprecated and replaced with out in vertex and in in fragment.