tg-emboss

Description

tg-emboss shows a simple emboss-style bump mapping (without material texture in this test).

This sample demo generates an image in a single pass with 2 TEV stages. If you use material texture, 3 tev stages are necessary.

Coverage

For Real hardware

Functions Parameters Description
GXSetVtxDesc Attributes GX_VA_NBT / GX_VA_TEX0
Types GX_DIRECT
GXSetTexCoordGen destination coord GX_TEXCOORD0 GX_TEXCOORD1
texgen type GX_TG_MTX2x4 GX_TG_BUMP0
texgen src GX_TG_TEX0 GX_TG_TEXCOORD0
mtx src GX_IDENTITY GX_IDENTITY
GXSetTevOrder tev stage GX_TEVSTAGE0 GX_TEVSTAGE1
texgen type GX_TEXCOORD0 GX_TEXCOORD1
texgen src GX_TEXMAP0 GX_TEXMAP1
mtx src GX_COLOR0A0 GX_COLOR_NULL
GXSetTevColor tev register ID GX_TEVREG0
tev register color { 0, 0, 0, bumpScale }
bumpScale can be changed interactively
GXSetTevColorIn tev stage GX_TEVSTAGE0 GX_TEVSTAGE1
tev color arg A GX_CC_ZERO GX_CC_ZERO
tev color arg B GX_TC_TEXC GX_TC_TEXC
tev color arg C GX_CC_A0 GX_CC_A0
tev color arg D GX_CC_RASC GX_CC_CPREV
GXSetTevColorOp tev stage GX_TEVSTAGE0 GX_TEVSTAGE1
TEV operation GX_TEV_ADD GX_TEV_SUB
tev bias GX_TB_ZERO GX_TB_ZERO
tev scale GX_CS_SCALE_1 GX_CS_SCALE_1
tev clamp GX_ENABLE GX_ENABLE
tev output GX_TEVPREV GX_TEVPREV
GXSetTevAlphaIn tev stage GX_TEVSTAGE0 GX_TEVSTAGE1
tev alpha arg A GX_CC_ZERO GX_CC_ZERO
tev alpha arg B GX_CC_ZERO GX_CC_ZERO
tev alpha arg C GX_CC_ZERO GX_CC_ZERO
tev alpha arg D GX_CC_ZERO GX_CC_ZERO
GXSetTevAlphaOp tev stage GX_TEVSTAGE0 GX_TEVSTAGE1
TEV operation GX_TEV_ADD GX_TEV_ADD
tev bias GX_TB_ZERO GX_TB_ZERO
tev scale GX_CS_SCALE_1 GX_CS_SCALE_1
tev clamp GX_DISABLE GX_DISABLE
tev output GX_TEVPREV GX_TEVPREV
GXDrawCube void Generate binormal / texture coord 0 also

Operation Method

The Menu button exits the test.

X Button moves cursor up.
B Button moves cursor down.

A Button changes parameter on the cursor.

Joy stick moves light position indicated a red rectangle.

Snapshot

Light position is the top left on the screen..

tg-emboss-1.gif (31637 bytes)

Light position is the bottom left on the screen..

tg-emboss-2.gif (39548 bytes)

Light position is the bottom left on the screen..

tg-emboss-3.gif (38121 bytes)

Light position is the top right on the screen..

tg-emboss-4.gif (39123 bytes)

Data Files Required

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

Revision History

03/01/2006 Initial version.