tg-light-fx

Description

This program performs some effects using texgen by vertex normals. There are three effects currently implemented. One is a cheap cartoon outline effect. The other two are textured specular highlight using two different types of texgen matrices.

Coverage

Functions Parameters Description
GXLoadTexMtxImm Matrices Appropriate projection matrix.
Matrix destination. GX_TEXMTX0
Types GX_MTX2x4
GXSetTexCoordGen Destination coordinates. GX_TEXCOORD0.
Generation type. GX_TG_MTX2x4
Generation source. GX_TG_NRM
Matrix source. GX_TEXMTX0
GXInitTexObj Image pointer. Appropriate value.
Width and height Appropriate value.
format GX_TF_IA8, GX_TF_IA4
Wrap mode (s, t). Always GX_CLAMP.
Mipmap Always GX_FALSE.
GXLoadTexObj Destination texture name. GX_TEXMAP0
GXSetTevOp TEV stage ID. Always GX_TEVSTAGE0.
Operation mode Always GX_DECAL.

Using the Demo

START exits the test.

The Control Stick moves the light position.
The C Stick rotates the object.

The A Button changes the effect mode.

The B Button hides the light direction mark.

The L/R buttons tune parameters for the current effect.

Snap Shots

Cheap cartoon outline.

tg-light-fx-0.jpg (6022 bytes)

Specular highlight by 1D texgen.

tg-light-fx-1.jpg (7491 bytes)

Specular highlight by 2D texgen.

tg-light-fx-2.jpg (6747 bytes)

Data Files Required

None.

Revision History

2006/03/01 Initial version.


CONFIDENTIAL