GPU Textures: Difference between revisions
No edit summary |
Rewrite most of this page. |
||
Line 1: | Line 1: | ||
This page describes the [[GPU_Commands|GPU commands]] used for textures. | This page describes the [[GPU_Commands|GPU commands]] used for textures. | ||
== | == Texture unit setup: Register 0x80 == | ||
Register 0x80 is used to enable individual texture units. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Bit | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 | ||
| | | Enable texture unit 0. | ||
|- | |- | ||
| 1 | | 1 | ||
| | | Enable texture unit 1. | ||
| | |- | ||
| | | 2 | ||
| Enable texture unit 2. | |||
|} | |} | ||
== Configuration of texture unit 0 == | |||
== | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | ! Register ID | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0x0081 | ||
| ? | | Border color (unverified) | ||
|- | |||
| 0x0082 | |||
| Bits 16-31 are the texture width. Bits 0-15 are the texture height. The maximum texture size in either direction is 1024. | |||
|- | |||
| 0x0083 | |||
| Texture parameters (filtering, wrapping), see below. | |||
|- | |||
| 0x0084 | |||
| LOD setup? | |||
|- | |||
| 0x0085 | |||
| Physical address of texture data (divided by 8). | |||
|- | |||
| 0x0086 | |||
| Physical address of texture data for cube mapping? | |||
|- | |||
| 0x0087 | |||
| Physical address of texture data for cube mapping? | |||
|- | |||
| 0x0088 | |||
| Physical address of texture data for cube mapping? | |||
|- | |||
| 0x0089 | |||
| Physical address of texture data for cube mapping? | |||
|- | |- | ||
| | | 0x008A | ||
| | | Physical address of texture data for cube mapping? | ||
|- | |- | ||
| | | 0x008B | ||
| | | Shadow related? | ||
|- | |- | ||
| | | 0x008E | ||
| | | Texture format (see below) | ||
|} | |||
== Configuration of texture units 1 and 2 == | |||
Texture units 1 and 2 use a configuration block similar to the one of texture unit 0. They are based at registers 0x0091 and 0x0099. | |||
{| class="wikitable" border="1" | |||
! Index word | |||
! Description | |||
|- | |- | ||
| 4 | | 0-4 | ||
| | | Same as for texture unit 0 | ||
|- | |- | ||
| 5 | | 5 | ||
| | | Texture format (see below) | ||
|} | |} | ||
== Configuration of texture unit 3 == | |||
The configuration block for texture unit 3 seems to be vastly different from the other texture units. Instead, registers 0x00A8 through 0x00B7 are used to configure procedural texturing features. | |||
== Texture info parameter structure for commands 0x0091 and 0x0099 == | == Texture info parameter structure for commands 0x0091 and 0x0099 == |