GXPokeAlphaMode

Syntax

#include <revolution/gx.h>

void GXPokeAlphaMode(
    GXCompare func,
    u8        threshold );

Arguments

func Compare function. Accepted values are:
Name Compare equation
GX_NEVER Always FALSE.
GX_LESS ( ( alpha_src < threshold )
GX_LEQUAL ( ( alpha_src <= threshold )
GX_EQUAL ( ( alpha_src == threshold )
GX_NEQUAL ( ( alpha_src != threshold )
GX_GEQUAL ( ( alpha_src >= threshold )
GX_GREATER ( ( alpha_src > threshold )
GX_ALWAYS Always TRUE.
threshold Threshold to which source alpha is compared.

Return Values

None.

Description

This function sets alpha and threshold value for pixels written to the embedded frame buffer (EFB) using the GXPoke* functions. The GXPoke* functions are for writing directly to the EFB from the CPU. Comparative functions are specified as follows.

src_alpha  func  threshold

for example:
src_alpha > 0x80

Alpha comparative functions use the source alpha channel as a template and can be used for conditional writing of pixels to the EFB. When compare functions are true, the source color is written to the EFB based on the Z comparison results.( See the GXPokeZMode function.) No writes are performed when the alpha comparison functions are false.

Alpha comparison tests are processed before Z comparisons and blend processing.( See the GXPokeBlendMode function.)

See Also

GXPokeARGB, GXPokeBlendMode

Revision History

2006/03/01 Initial version.


CONFIDENTIAL