tf-tg-mtx

Description

tf-tg-mtx uses all default texture matrices to test texture coordinate generation. The following texture coordinate schemes are tested.

(Texture coordinates) * (Identity matrix)
(Position coordinates) * (3x4 matrix) : Texture projection
(Texture coordinates) * (2x4 matrix) : Texture transform
(Normal vector) * (3x4 matrix) : Reflection mapping

The GX_IDENTITY matrix is always transforming the center cube for comparison. Since this would result in Q = 0 for projection and reflection mapping, the center cube is not rendered for those cases.

It is important to note for the reflection mapping area, the normals of the cube have been bent outward to resemble those of a sphere. We would have used a sphere model except that it is very hard to tell when a reflection-mapped sphere is rotating.

Coverage

Functions Parameters Description
GXLoadTexMtxImm Matrices Provides different matrix for each cube.
Matrix output destination GX_TEXMTX0 - GX_TEXMTX9
Matrix type GX_MTX2x4 or GX_MTX3x4 depending on the type to generate.
GXSetTexCoordGen Texture coordinate destination Always GX_TEXCOORD0.
Features used in texture coordinate generation GX_TG_MTX3x4 or GX_TG_MTX2x4 depending on the type to generate.
Original attributes used in texture coordinate generation GX_TG_TEX0, GX_TG_POS, GX_TG_NRM
Matrix input source. GX_TEXMTX0-GX_TEXMTX9, GX_IDENTITY

Using the Demo

START exits the demo.

The B Button stops/starts cube rotation.

The X Button changes the texgen method.

Snapshot

No texgen. The texture coordinates are all transformed by an identity matrix.

tf-tg-mtx-1.jpg (13420 bytes)

Projected texture.

tf-tg-mtx-2.jpg (11105 bytes)

Texture transform.

tf-tg-mtx-3.jpg (14086 bytes)

Reflection mapping.

tf-tg-mtx-4.jpg (11953 bytes)

Data Files Required

$REVOLUTION_SDK_ROOT/dvddata/gxTests/tf-02.tpl

Revision History

2006/03/01 Initial version.


CONFIDENTIAL