even the UVs never change
They do not change from drawcall to drawcall. But in the end your fragment shader interpolates the UV value for the current fragment from the vertices of the current triangle. And those values can change from pixel to pixel. The shader thus needs to associate the UV values with the vertices of the current pixel's triangle.
Usually, the fragment shader takes the UV value for the current fragment as an input from the vertex shader:
Vertex Shader:
out vec2 UV;
void main(){
...
UV = vertexUV;
}
Fragment Shader:
in vec2 UV;
uniform sampler2D myTextureSampler;
void main(){
color = texture( myTextureSampler, UV ).rgb;
}
even the UVs never change
They do not change from drawcall to drawcall. But in the end the rasterizer interpolates the UV value for the current fragment from the UV values of the vertices of the current triangle, following the information provided by the vertex shader. And those values can change from vertex to vertex .
I don't see how you would be able to deal with that in the fragment shader alone. You provide 4 UVs and look at 3 vertices for each triangle. How would you figure out what UVs to use and how would you compute the value for the current fragment?? In the end that is what the vertex shader and rasterizer combination is for, isn't it?
Also, why do you want to do that at all? The amount of data that are being transferred here seem too small to me to be worth the effort...