GXInitFogAdjTable

C Specification

#include <revolution/gx.h>
void GXInitFogAdjTable(
GXFogAdjTable*  table,
u16             width,
f32             projmtx[4][4] );

Arguments

table The range adjustment parameter table that uses GXSetFogRangeAdj to send to the graphics pipe.
width Width of the viewport (in pixels). Match this value to that of the current viewport's settings. Failure to do so may result in an incorrect range adjustment.
projmtx The project matrix used in rendering for the viewport.

Return Values

None.

Description

This function generates the standard range adjustment table and puts the results into table (the user must allocate table). This table can be used by GXSetFogRangeAdj to adjust the visual-space Z used for fog based upon the X position 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 width of the viewport is specified using width. The projmtx parameter is the projection matrix that is used to render into the viewport. It must be specified so that the function can compute the X extent of the viewing frustum in visual space.

See Also

GXSetFog
GXSetFogRangeAdj
GXFogAdjTable

Revision History

03/01/2006 Initial version.