GsFOGPARAM

Fog (depth cue) information

struct GsFOGPARAM {
        short dqa;
        long dqb;
        u_char rfc, gfc, bfc;
};

Members

dqa Parameter specifying the degree of blending with respect to depth
dqb Parameter specifying the degree of blending with respect to depth
rfc, gfc, bfc Background colours

Explanation

GsFOGPARAM describes fog (depth cue) information.
dqa and dqb are background colour attenuation coefficients.
They can be calculated using the following formulae:

dqa = -df * 4096/64/h
dqb = 1.25 * 4096 * 4096

df is the distance where the attenuation coefficient is 1; that is, the distance from the viewpoint to the point where the background colours are completely blended.
h is the distance from the viewpoint to the screen and is also known as the projection distance.