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 drawn 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

Function Parameters Description
GXLoadTexMtxImm Matrices different matrix sent down for each cube
matrix destination GX_TEXMTX0 - GX_TEXMTX9
Matrix type GX_MTX2x4 or GX_MTX3x4 depeneding on generation type.
GXSetTexCoordGen   Destination coordinates. Always GX_TEXCOORD0.
texgen type GX_TG_MTX3x4 or GX_TG_MTX2x4 depending on generation type.
texgen src GX_TG_TEX0, GX_TG_POS, GX_TG_NRM
Matrix input source. GX_TEXMTX0-GX_TEXMTX9, GX_IDENTITY

Operation Method

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

03/01/2006 Initial version.