3DGS have a built in fog function for that.
http://www.conitec.net/beta/aview-fog_start.htm

default fog color is white. To set predefined fog you can use something like fog_color = 1 default white, 2 for blue, 3 for red and etc.
http://www.conitec.net/beta/afog_color.htm

to use your own fog color use this.
http://www.conitec.net/beta/ad3d_fogcolor.htm