The most efficient way to calculate center of rect in shader?

what if only pass the 4 corner points to VS? is it able to calculate its center by gl_VertexID or something else, if it was possible is it efficient than calculate the center and pass it with the 4 corner points to VS? Thanks!