gDPSetAlphaCompare
Sets the alpha compare mode
#include <ultra64.h> /* gbi.h */
gDPSetAlphaCompare(Gfx *gdl, u32 mode)
gsDPSetAlphaCompare( u32 mode)
Sets the mode for comparing the alpha value of the pixel input to the blender (BL) with an alpha source. The alpha compare modes are explained below:
For details, see Sections 15.5.4 "Alpha Compare Calculation" and 12.7.4 "Alpha Compare" in the N64 Programming Manual.
When you are using anti-aliasing rendering modes you cannot specify transparent regions.
Comment
If you are going to perform alpha compares in 1-cycle or 2-cycle pipeline mode, please set appropriate rendering mode. In copy mode, you can use G_AC_THRESHOLD and G_AC_DITHER. Since normal alpha blending is prohibited, you cannot express transparency in any other way. For 16-bit RGBA (5/5/5/1), the alpha bit itself plays the write-enabling role, so no comparison is made with the blend color alpha value. For 8-bit color index (CI), the blend color alpha comparison is enabled. For 32-bit RGBA it cannot be used.
To learn more about the cycle type setting, see gDPSetCycleType.
gDPSetBlendColor, gDPSetCycleType, and gDPSetRenderMode
Revision History
02/01/99 Completely rewritten.
03/31/99 Modified the Comment.