Application below is an example of how can be achieved fog effect in OpenGL. It uses a visualisation of depth buffer to do its way. The model files presented here are available on Crytek's homepage: http://www.crytek.com/cryengine/cryengine3/downloads