QSB FOG

From Quake Wiki

QSB Fog is meant to exist alongside existing fog capabilities of engines, acting as a common ground for mods to use to ensure a common look across engines. Fog will start at <nearclip>, fade up to <farclip> after which point nothing is seen of the level. Colors <red> <green> <blue>, ranging from 0 0 0 (black) to 1 1 1 (white). QSB Fog is not a requirement in software-rendered engines.


New console command: qsb_fog <nearclip> <farclip> <red> <green> <blue>. If all values specified are 0, fog is turned off.


worldspawn can specify "qsb_fog_dist" "0 1024" (first value is nearclip, second is farclip) to set fog values.

worldspawn can specify "qsb_fog_color" "0.5 0.5 0.5" (colors for the fog in red, green and blue) to set fog values.


If QuakeC specifies vector fields .qsb_fog_dist and .qsb_fog_color, the values from worldspawn are stored in these fields, which are useful when using NEH_RESTOREGAME, to restore fog to the level after loading a savegame.