lit-tx-alpha

Description

This program tests simple combinations of lighting and texture. There are two spotlights: one is used in a color channel and the other is used in an alpha channel. The alpha light makes textured panels opaque by using alpha blending.

Coverage

Functions Parameters Description
GXInitLightDir Light direction (nx, ny, nz) Various values.
GXSetChanCtrl Color channel ID GX_COLOR0 / GX_ALPHA0
Channel enable Always GX_ENABLE.
Ambient color source Always register source.
Material color source Always register source.
Light mask GX_LIGHT0 for Color0 channel.
GX_LIGHT1 for Alpha0 channel.
Diffusion function Always GX_DF_CLAMP.
Attenuation function Always GX_AF_SPOT.
GXSetChanAmbColor Ambient color Only one value.
GXSetChanMatColor Material color Only one value.
GXSetTevOp TEV stage ID Always GX_TEVSTAGE0.
Mode GX_MODULATE, GX_REPLACE
GXSetBlendMode Types GX_BM_BLEND
Input factor GX_BL_SRCALPHA
Output factor GX_BL_INVSRCALPHA
Logic calculations N/A

Using the Demo

START exits the test.

The A button changes the shape of the front panel.

The B button selects a light (color light/alpha light). The selected light blinks.

The Control Stick changes the direction of the selected light.

Snapshot

The lower left is the alpha light and upper right is the color (White) light.

lit-tx-alpha.jpg (35938 bytes)

Required Data Files

$REVOLUTION_SDK_ROOT/dvddata/gxTextrs.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL