Alternativley, and best for low-poly scenes, you can just check Compute Fog Per Pixel in your material’s details panel.