lit-atn-func

Description

This program tests two convenient light attenuation functions. There are two subtests in this program: angular attenuation mode and distance attenuation mode.

Coverage

Functions Parameters Description
GXInitLightSpot Cutoff angle Various values.
Spot function GX_SP_OFF, GX_SP_FLAT, GX_SP_COS, GX_SP_COS2, GX_SP_SHARP, GX_SP_RING1, GX_SP_RING2.
GXInitLightDistAttn Light reference distance Always GX_TEVSTAGE0.
Reference brightness GX_MODULATE, GX_REPLACE
Distance Attenuation Function GX_DA_OFF, GX_DA_GENTLE, GX_DA_MEDIUM, GX_DA_STEEP.
GXSetChanCtrl Color channel ID Always GX_COLOR0.
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 Always GX_MODULATE.

Using the Demo

START exits the test.

The B button toggles between the angular and distance tests.

    Angular (Spot) Attenuation Test

The X and Y buttons change the spot function type.
The Controller Stick (left/right) changes the cutoff angle.

    Distance Attenuation Test

The X and Y buttons change the distance attenuation function type.
The Control Stick (left/right) changes the reference distance.
The Control Stick (up/down) changes the reference brightness.

Snapshot

Angular: GX_SP_FLAT. Angular: GX_SP_COS2.
lit-atn-func-1.jpg (7903 bytes) lit-atn-func-3.jpg (6237 bytes)
Distance attenuation: GX_DA_GENTLE. Distance attenuation: GX_DA_STEEP.
lit-atn-func-8.jpg (3679 bytes) lit-atn-func-10.jpg (4022 bytes)

Required Data Files

$REVOLUTION_SDK_ROOT/dvddata/gxTests/lit-10.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL