GXSetFogRangeAdj

Syntax

#include <revolution/gx.h>

void GXSetFogRangeAdj(
		GXBool		enable,
		u16		center,
		GXFogAdjTable*	table );

Arguments

enable Enables range adjustment when set to GX_ENABLE.
center The center to apply the range adjustment function. Normally matches the center of the viewport.
table The table of range adjustment coefficients. Normally, the GXInitFogAdjTable function is used to initialize this.

Return Values

None.

Description

This function allows enabling or disabling horizontal fog-range adjustment. This adjustment is a factor that is multiplied by the visual-space Z value used for fog computation. It is based upon the X coordinate value of the pixels being rendered. The Y direction is not compensated for. This effectively increases the fog density at the edges of the screen, making for a more realistic fog effect. The correction is computed per quad (2x2 pixels), not per pixel. The center of the viewport is specified using center. The range adjustment table is specified using table. The range adjust function is mirrored horizontally about the center.

The GXInit function disables range adjustment by default.

See Also

GXSetFog, GXInitFogAdjTable, GXFogAdjTable

Revision History

2006/03/01 Initial version.


CONFIDENTIAL