3D code was super slow, we now copy the pixel array directly, instead of pixel by pixel