I had looked at that, but what threw me off is the docs "To send data from vertex to fragment shader, varyings are used. ".
But you are probably right, in the sense that this could be a workaround. I will have to try it.
EDIT: So varying is unsuitable. It cannot be initialized in globals and also can only be assigned to in vertex functions.