Line 4,583: |
Line 4,583: |
| ! Description | | ! Description |
| |- | | |- |
− | | 0-1 | + | | 0 |
| | Enabled (0 = disabled, 1 = enabled) | | | Enabled (0 = disabled, 1 = enabled) |
| |} | | |} |
Line 4,805: |
Line 4,805: |
| |} | | |} |
| | | |
− | Reference tables: | + | Reference table values: |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 4,826: |
Line 4,826: |
| | Color difference table | | | Color difference table |
| |} | | |} |
| + | |
| + | === GPUREG_PROCTEX_LUT_DATA''i'' === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-31 |
| + | | LUT data |
| + | |} |
| + | |
| + | These registers behave as a FIFO queue. Each write to these registers writes the provided value to the table selected with GPUREG_PROCTEX_LUT, starting at the selected index. |
| | | |
| ==== Noise Table ==== | | ==== Noise Table ==== |
Line 4,909: |
Line 4,921: |
| |} | | |} |
| | | |
− | === GPUREG_PROCTEX_LUT_DATA''i'' === | + | === GPUREG_TEXENV''i''_SOURCE === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-3 |
| + | | RGB source 0 |
| + | |- |
| + | | 4-7 |
| + | | RGB source 1 |
| + | |- |
| + | | 8-11 |
| + | | RGB source 2 |
| + | |- |
| + | | 16-19 |
| + | | Alpha source 0 |
| + | |- |
| + | | 20-23 |
| + | | Alpha source 1 |
| + | |- |
| + | | 24-27 |
| + | | Alpha source 2 |
| + | |} |
| + | |
| + | Source values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Primary color |
| + | |- |
| + | | 1 |
| + | | Fragment primary color |
| + | |- |
| + | | 2 |
| + | | Fragment secondary color |
| + | |- |
| + | | 3 |
| + | | Texture 0 |
| + | |- |
| + | | 4 |
| + | | Texture 1 |
| + | |- |
| + | | 5 |
| + | | Texture 2 |
| + | |- |
| + | | 6 |
| + | | Texture 3 |
| + | |- |
| + | | 13 |
| + | | Previous buffer |
| + | |- |
| + | | 14 |
| + | | Constant (from GPUREG_TEXENV''i''_COLOR) |
| + | |- |
| + | | 15 |
| + | | Previous |
| + | |} |
| + | |
| + | === GPUREG_TEXENV''i''_OPERAND === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-3 |
| + | | RGB operand 0 |
| + | |- |
| + | | 4-7 |
| + | | RGB operand 1 |
| + | |- |
| + | | 8-11 |
| + | | RGB operand 2 |
| + | |- |
| + | | 12-14 |
| + | | Alpha operand 0 |
| + | |- |
| + | | 16-18 |
| + | | Alpha operand 1 |
| + | |- |
| + | | 20-22 |
| + | | Alpha operand 2 |
| + | |} |
| + | |
| + | RGB operand values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Source color |
| + | |- |
| + | | 1 |
| + | | One minus source color |
| + | |- |
| + | | 2 |
| + | | Source alpha |
| + | |- |
| + | | 3 |
| + | | One minus source alpha |
| + | |- |
| + | | 4 |
| + | | Source red |
| + | |- |
| + | | 5 |
| + | | One minus source red |
| + | |- |
| + | | 8 |
| + | | Source green |
| + | |- |
| + | | 9 |
| + | | One minus source green |
| + | |- |
| + | | 12 |
| + | | Source blue |
| + | |- |
| + | | 13 |
| + | | One minus source blue |
| + | |} |
| + | |
| + | Alpha operand values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Source alpha |
| + | |- |
| + | | 1 |
| + | | One minus source alpha |
| + | |- |
| + | | 2 |
| + | | Source red |
| + | |- |
| + | | 3 |
| + | | One minus source red |
| + | |- |
| + | | 4 |
| + | | Source green |
| + | |- |
| + | | 5 |
| + | | One minus source green |
| + | |- |
| + | | 6 |
| + | | Source blue |
| + | |- |
| + | | 7 |
| + | | One minus source blue |
| + | |} |
| + | |
| + | === GPUREG_TEXENV''i''_COMBINER === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-3 |
| + | | RGB combine |
| + | |- |
| + | | 16-19 |
| + | | Alpha combine |
| + | |} |
| + | |
| + | Combine values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Replace |
| + | |- |
| + | | 1 |
| + | | Modulate |
| + | |- |
| + | | 2 |
| + | | Add |
| + | |- |
| + | | 3 |
| + | | Add signed |
| + | |- |
| + | | 4 |
| + | | Interpolate |
| + | |- |
| + | | 5 |
| + | | Subtract |
| + | |- |
| + | | 6 |
| + | | Dot3 RGB |
| + | |- |
| + | | 7 |
| + | | Dot3 RGBA |
| + | |- |
| + | | 8 |
| + | | Multiply then add |
| + | |- |
| + | | 9 |
| + | | Add then multiply |
| + | |} |
| + | |
| + | === GPUREG_TEXENV''i''_COLOR === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-7 |
| + | | Red |
| + | |- |
| + | | 8-15 |
| + | | Green |
| + | |- |
| + | | 16-23 |
| + | | Blue |
| + | |- |
| + | | 24-31 |
| + | | Alpha |
| + | |} |
| + | |
| + | === GPUREG_TEXENV''i''_SCALE === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-1 |
| + | | RGB scale |
| + | |- |
| + | | 16-17 |
| + | | Alpha scale |
| + | |} |
| + | |
| + | Scale values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | 1x |
| + | |- |
| + | | 1 |
| + | | 2x |
| + | |- |
| + | | 2 |
| + | | 4x |
| + | |} |
| + | |
| + | === GPUREG_TEXENV_UPDATE_BUFFER === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-2 |
| + | | Fog mode |
| + | |- |
| + | | 3 |
| + | | Shading density source |
| + | |- |
| + | | 8 |
| + | | TexEnv 1 RGB buffer input |
| + | |- |
| + | | 9 |
| + | | TexEnv 2 RGB buffer input |
| + | |- |
| + | | 10 |
| + | | TexEnv 3 RGB buffer input |
| + | |- |
| + | | 11 |
| + | | TexEnv 4 RGB buffer input |
| + | |- |
| + | | 12 |
| + | | TexEnv 1 alpha buffer input |
| + | |- |
| + | | 13 |
| + | | TexEnv 2 alpha buffer input |
| + | |- |
| + | | 14 |
| + | | TexEnv 3 alpha buffer input |
| + | |- |
| + | | 15 |
| + | | TexEnv 4 alpha buffer input |
| + | |- |
| + | | 16 |
| + | | Z flip (0 = don't flip, 1 = flip) |
| + | |} |
| + | |
| + | This register is shared between the gas/fog mode configuration and TexEnv buffer inputs. TexEnv buffer inputs are typically written with a mask of 0x2, and the gas/fog mode configuration is typically written with a mask of 0x5. |
| + | |
| + | Fog mode values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Disabled |
| + | |- |
| + | | 5 |
| + | | Fog |
| + | |- |
| + | | 7 |
| + | | Gas |
| + | |} |
| + | |
| + | Shading density source values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Plain density |
| + | |- |
| + | | 1 |
| + | | Depth density |
| + | |} |
| + | |
| + | Buffer input values: |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Value |
| + | ! Description |
| + | |- |
| + | | 0 |
| + | | Previous buffer |
| + | |- |
| + | | 1 |
| + | | Previous |
| + | |} |
| + | |
| + | === GPUREG_FOG_COLOR === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-7 |
| + | | Red |
| + | |- |
| + | | 8-15 |
| + | | Green |
| + | |- |
| + | | 16-23 |
| + | | Blue |
| + | |} |
| + | |
| + | === GPUREG_GAS_ATTENUATION === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-15 |
| + | | float16, Gas density attenuation |
| + | |} |
| + | |
| + | === GPUREG_GAS_ACCMAX === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-15 |
| + | | float16, Gas maximum density accumulation |
| + | |} |
| + | |
| + | === GPUREG_FOG_LUT_INDEX === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-31 |
| + | | Index |
| + | |} |
| + | |
| + | === GPUREG_FOG_LUT_DATA''i'' === |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 4,919: |
Line 5,314: |
| |} | | |} |
| | | |
− | These registers behave as a FIFO queue. Each write to these registers writes the provided value to the table selected with GPUREG_PROCTEX_LUT, sequentially. | + | These registers behave as a FIFO queue. Each write to these registers writes the provided value to the fog look-up table, starting at the index selected with GPUREG_FOG_LUT_INDEX. |
| + | |
| + | ==== Fog Look-Up Table ==== |
| + | |
| + | 128 elements: |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-12 |
| + | | fixed13 (11 fractional bits), Difference from next element |
| + | |- |
| + | | 13-23 |
| + | | unsigned fixed11, Value |
| + | |} |
| + | |
| + | === GPUREG_TEXENV_BUFFER_COLOR === |
| + | |
| + | {| class="wikitable" border="1" |
| + | ! Bits |
| + | ! Description |
| + | |- |
| + | | 0-7 |
| + | | Red |
| + | |- |
| + | | 8-15 |
| + | | Green |
| + | |- |
| + | | 16-23 |
| + | | Blue |
| + | |- |
| + | | 24-31 |
| + | | Alpha |
| + | |} |
| | | |
| == Framebuffer registers == | | == Framebuffer registers == |