Add maximum viewing distance to display and only switch if ray hit is shorter.