This program shows an example of complicated full-scene shadow generation. This demo uses depth buffer-based method, which can also produce self-shadowing effect. (For details, see the Algorithm Details section.))
This list doesn't contain settings for drawing other than full-scene shadows.
| Functions | Parameters | Description |
GXLoadTexMtxImm |
Matrices | Appropriate projection matrix. |
| Matrix destination. | GX_TEXMTX0, GX_TEXMTX1 |
|
| Types | GX_MTX3x4 |
|
GXSetNumTexGens |
number of texgens | 2 |
GXSetTexCoordGen |
Destination coordinates. | GX_TEXCOORD0, GX_TEXCOORD1 |
| Generation type. | GX_TG_MTX3x4 |
|
| Generation source. | GX_TG_POS |
|
| Matrix source. | GX_TEXMTX0, GX_TEXMTX1 |
|
GXInitTexObj |
Pointer to image data. | Appropriate value. |
| Width and height | Some constant values | |
| Format | GX_TF_RGBA8 |
|
| Wrap mode (s, t). | GX_CLAMP |
|
| Mipmap | Always GX_FALSE. |
|
|
Destination texture name. | GX_TEXMAP0, GX_TEXMAP1 |
GXInvalidateTexAll |
(No parameter) | |
GXSetTexCopySrc |
top / left / width / height | Some constant values |
GXSetTexCopyDst |
Width and height | Some constant values |
| Format | GX_TF_Z24X8 |
|
| Mipmap filter | GX_FALSE. |
|
GXCopyTex |
Pointer to image data. | Appropriate value. |
| Clear operation | GX_TRUE. |
|
|
Number of TEV Stages | 3 (for 8-bit compare mode), 5 (for 16-bit compare mode) |
|
Each argument | see algorithm details |
|
Each argument | see algorithm details |
|
Each argument | see algorithm details |
|
Each argument | see algorithm details |
|
Each argument | see algorithm details |
|
TEV Color Register | GX_TEVREG0, GX_TEVREG2 |
| Color value | Appropriate value. | |
|
culling mode | GX_CULL_FRONT, GX_CULL_BACK |
GXSetColorUpdate |
color update mode | GX_ENABLE / GX_DISABLE |
GXPixModeSync |
(No parameter) |
End the test with START.
The main stick moves camera position.
The sub stick moves light position.
The A Button changes display modes.
The B Button switches the shadow projection type (perspective/orthographic).
The Y Button changes the size of shadow map.

None.
See Section "7.1 Depth-Based Full-Scene Shadow Mapping" in "Graphics Library [Application Edition]."
2006/03/01 Initial version.
CONFIDENTIAL