also moved some vec3 definitions outside their respective function bodies to speed thing sup and create less garbage