My game is set in an outdoor environment with unlimited distances. The viewing distance has to be limited, as usual. Because of that, there is a clear cut-off and some objects blink in and out when moving around. Now I am investigating how to use a distance fog to improve the display, and hide the cut-off.
Implementing a fog gradient depending on distance was easy, but the problem is in combination with the sky. It is at a very long distance, and would thus get hidden completely by the fog. However, if I disable the fog gradient for the sky pixels, the far distance horizon does not look good. The distant ground will be completely gray, as expected, but the transition from ground pixel to sky pixel will be abrupt from white to blue. That means that the horizon profile will show clearly, which does not look realistically.
As a next step, I added a vertical gradient for the distance fog. Opaqueness going from 1 to 0 from horizontal level up to 20 degrees elevation. This will effectively hide most distant horizon objects behind fog, and still leave some sky above. However, tall buildings and other constructions will still be visible on distance, and suffer the abrupt cut-off.
Any suggestions on how to improve the situation with tall buildings?
The picture shows vertical gradient enabled (but not tall objects suffering cut-off).