#include <revolution/gx.h>
void GXInitFogAdjTable(
GXFogAdjTable* table,
u16 width,
f32 projmtx[4][4] );
| table | The range adjustment parameter table that uses the GXSetFogRangeAdj function to send to the graphics pipe. |
|---|---|
| width | Viewport width. 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. |
None.
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 the GXSetFogRangeAdj function to adjust the visual-space Z, which is used for fog, based upon the X position of the pixels being rendered. No compensation is made for the Y direction. 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 argument is the projection matrix that is used to render into the viewport. This parameter must be specified so that the function can compute the X extent of the viewing frustum in visual space.
GXSetFog, GXSetFogRangeAdj, GXFogAdjTable
2006/03/01 Initial version.
CONFIDENTIAL