Used pointers and heap allocation to make it so that the shadowRay can be used after calculations within the light gen loop