Fix up fog, and make render distance controllable