al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
gSPFogPositionFormat#include "gbi.h" gSPFogPosition(Gfx *gdl, int min, int max) gsSPFogPosition(int min, int max)Arguments
It sets the thickness of the fog by changing the color of objects based on their Z position. Generally objects that are farther away (from the viewer) are blended with the "fog color" (see gDPSetFogColor). The farther the object, the closer the object's color gets to the fog's color. This effect can be used to make objects fade into the distance instead of being abruptly clipped away when they reach the far clipping plane. To use this effect set the max parameter to 1000 to cause the object to be totally fogged out at the far plane. Use the min parameter to set the distance at which the object begins to fade into the fog. This can be the front clipping plane (min=0) or partway between the front and back planes (0<min<1000). Example To turn fog on, use this code: gDPSetCycleType(glistp++, G_CYC_2CYCLE); gDPSetFogColor(glistp++, fog_red, fog_green, fog_blue, 0xff); gDPSetRenderMode(glistp++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2); gSPFogPosition(glistp++, 500, 1000); gSPSetGeometry(glistp++, G_FOG);See Also gDPSetFogColor gDPSetRenderMode gDPSetCycleType
|