It is not obvious what's specific about vec_to_uv etc. in your example, couldn't you achieve the same effect with shifting uv via material?