lit-prelit

Description

This program performs a prelighting test. In this test, the software calculates the prelit color for each vertex. The prelit color functions as the ambient color of the RGB color channel when the color of hardware lights is added.

Coverage

This program also tests any combination of material/ambient source settings.

Functions Parameters Description
GXInitLightDir Light direction (nx, ny, nz) Various values.
GXSetChanCtrl Color channel ID Always GX_COLOR0.
Channel enable Always GX_ENABLE.
Ambient color source GX_SRC_VTX / GX_SRC_REG
Material color source GX_SRC_VTX / GX_SRC_REG
Light mask All lights always enabled.
Diffusion function Always GX_DF_CLAMP.
Attenuation function Always GX_AF_SPOT.
GXSetChanAmbColor Ambient color Only one color.
GXSetChanMatColor Material color Only one color.

Using the Demo

START exits the test.

The A button changes the material/ambient source settings. Four combination patterns are shown in turn.

Snapshot

Prelit color is not used. Both material and ambient sources are registers.

lit-prelit-0.jpg (3203 bytes)

Prelit color is used as ambient. Material source is register.

lit-prelit-1.jpg (4767 bytes)

Prelit color is used as material. Ambient source is register.

lit-prelit-2.jpg (3195 bytes)

Prelit color is used as both material and ambient.

lit-prelit-3.jpg (4262 bytes)

Required Data Files

None.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL