NV2A/Pixel Combiner
From xboxdevwiki
The NV2A implements NV_register_combiners (and NV_register_combiners2?). Texturing modes are from: https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_shader.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_shader2.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_shader3.txt
Data types
NV_texture_shader suggests that: "The 8-bit and 16-bit signed fixed-point types are used for signed internal texture formats, while the 9-bit signed fixed-point type is used for register combiners computations." Here is a table from the GL extension:
floating-point | 8-bit fixed-point | 9-bit fixed-point | 16 bit fixed-point |
---|---|---|---|
1.0 | n/a | 255 | n/a |
0.99996... | n/a | n/a | 32767 |
0.99218... | 127 | n/a | n/a |
0.0 | 0 | 0 | 0 |
-1.0 | -128 | -255 | -32768 |
-1.00392... | n/a | -256 | n/a |
Texturing modes
ID | Name | GL Name | Stage 1 | Stage 2 | Stage 3 | Stage 4 | Notes |
---|---|---|---|---|---|---|---|
0x00 | PS_TEXTUREMODES_NONE texcoord?[citation needed] |
NONE | ✔ | ✔ | ✔ | ✔ | |
0x01 | PS_TEXTUREMODES_PROJECT2D tex |
TEXTURE_2D | ✔ | ✔ | ✔ | ✔ | |
0x02 | PS_TEXTUREMODES_PROJECT3D | TEXTURE_3D | ✔ | ✔ | ✔ | ✔ | |
0x03 | PS_TEXTUREMODES_CUBEMAP | TEXTURE_CUBE_MAP_ARB | ✔ | ✔ | ✔ | ✔ | |
0x04 | PS_TEXTUREMODES_PASSTHRU texcoord?[citation needed] |
PASS_THROUGH_NV | ✔ | ✔ | ✔ | ✔ | |
0x05 | PS_TEXTUREMODES_CLIPPLANE texkill |
CULL_FRAGMENT_NV | ✔ | ✔ | ✔ | ✔ | |
0x06 | PS_TEXTUREMODES_BUMPENVMAP texbem |
OFFSET_TEXTURE_2D_NV | ✗ | ✔ | ✔ | ✔ | |
0x07 | PS_TEXTUREMODES_BUMPENVMAP_LUM texbeml |
OFFSET_TEXTURE_2D_SCALE_NV | ✗ | ✔ | ✔ | ✔ | |
0x08 | PS_TEXTUREMODES_BRDF texm3x2tex |
✗ | ✗ | ✔ | ✔ | ||
0x09 | PS_TEXTUREMODES_DOT_ST texm3x2pad?[citation needed] |
DOT_PRODUCT_NV[citation needed] | ✗ | ✗ | ✔ | ✔ | |
0x0A | PS_TEXTUREMODES_DOT_ZW texm3x2tex?[citation needed] |
DOT_PRODUCT_NV[citation needed] | ✗ | ✗ | ✔ | ✔ | |
0x0B | PS_TEXTUREMODES_DOT_RFLCT_DIFF | DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV[citation needed] | ✗ | ✗ | ✔ | ✗ | |
0x0C | PS_TEXTUREMODES_DOT_RFLCT_SPEC | DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV[citation needed] | ✗ | ✗ | ✗ | ✔ | |
0x0D | PS_TEXTUREMODES_DOT_STR_3D | DOT_PRODUCT_TEXTURE_3D_NV | ✗ | ✗ | ✗ | ✔ | |
0x0E | PS_TEXTUREMODES_DOT_STR_CUBE | DOT_PRODUCT_REFLECT_CUBE_MAP_NV | ✗ | ✗ | ✗ | ✔ | |
0x0F | PS_TEXTUREMODES_DPNDNT_AR texreg2ar |
DEPENDENT_AR_TEXTURE_2D_NV | ✗ | ✔ | ✔ | ✔ | |
0x10 | PS_TEXTUREMODES_DPNDNT_GB texreg2gb |
DEPENDENT_GB_TEXTURE_2D_NV | ✗ | ✔ | ✔ | ✔ | |
0x11 | PS_TEXTUREMODES_DOTPRODUCT | DOT_PRODUCT_NV | ✗ | ✔ | ✔ | ✗ | |
0x12 | PS_TEXTUREMODES_DOT_RFLCT_SPEC_CONST | DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV | ✗ | ✗ | ✗ | ✔ |
Also known from nvidia docs:
- texm3x3pad [stage 1, stage 2]
- texm3x3spec [stage 3]
- texm3x3vspec [stage 3]
- texm3x3tex [stage 3]
Debugging
PIX from the Microsoft XDK provides great debugging capabilities.