Also referred to as fog or depth cueing, atmospheric attenuation causes the scene to be rendered such that objects appear to fade into the distance (into the fog). It is implemented via a linear interpolation model. In the linear model, the color at each vertex of a primitive is dependent on it's position relative to two reference planes perpendicular to the viewing axis. Given hither and yon plane values, the color is calculated as:
atmospheric attenuation = (z - yon) / (hither - yon)
It is enabled by calling:
In general, the hither and yon planes should reflect the extent of the objects in camera space (see ::Compute_Coordinates and ::Compute_Circumsphere for conversions to this coordinate system). (HOOPS/3dGS does not currently provide user control of hither and yon planes for use by the z-buffer.)
A bridge on the left and atmospheric attenuation applied to the bridge image on the right to give a foggy effect.
The sample program depthcue.c shows how to use atmospheric attenuation.