Handle fog density values of 0 (Bug #1549)