Reality Display Processor/Commands: Difference between revisions
Set Environment/Primitive/Blend/Fog/Fill Color
m (→0x0C through 0x0F - Shaded Triangle: missed Word 4) |
(Set Environment/Primitive/Blend/Fog/Fill Color) |
||
Line 805:
}}
====<span style="display:none;">0x37 -
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="17"|
|-
| 63:48 || — || — || colspan=6| command = 0x37[5:0] || — || — || — || — || — || — || — || —
Line 814:
| 47:32 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| 31:16 || colspan=16|
|-
| 15:0 || colspan=16|
|}
{{#invoke:Register table|definitions
| 61:56 | command[5:0] | 0x37
| 31:0 |
}}
Sets the fill color register, the color to use when rendering primitives in FILL mode. This is the only color sampled by FILL mode as all other pipeline stages are bypassed. This color is not made available to the Color Combiner or the Blender, and Fill Rectangle outside of FILL mode does not use it.
====<span style="display:none;">0x38 - Set_Fog_Color ====▼
Since FILL mode simply repeats the 32-bit value verbatim out to memory, proper usage of the color parameter will depend on the color image configuration:
* 32-bit: A single RGBA32 color occupying all 32 bits.
* 16-bit: Two RGBA16 colors occupying the upper and lower 16 bits respectively. Even pixels sample the upper half and odd pixels sample the lower half. For filling the color image with a solid color, simply let the upper and lower halves hold the same value.
* 8-bit: Four 8-bit intensity values, repeating every four pixels.
* 4-bit: N/A, crash
'''Hazards'''
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old fill color and the new fill color, if it was used.
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="17"|
|-
| 63:48 || — || — || colspan=6| command = 0x38[5:0] || — || — || — || — || — || — || — || —
Line 832 ⟶ 843:
| 47:32 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| 31:16 || colspan=8|
|-
| 15:0 || colspan=8|
|}
{{#invoke:Register table|definitions
| 61:56 | command[5:0] |
| 31:24 |
| 23:16 |
| 15:8 |
| 7:0 |
}}
Sets the "Fog" color register to the provided RGBA value. This color is accessible from the Blender as an input.
====<span style="display:none;">0x39 - Set_Blend_Color ====▼
The name "Fog" reflects only one particular usage of how the color may be used, the name does not relate to any particular meaning in the hardware.
'''Hazards'''
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old fog color and the new fog color, if it was used.
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="17"|
|-
| 63:48 || — || — || colspan=6| command = 0x39[5:0] || — || — || — || — || — || — || — || —
Line 853 ⟶ 871:
| 47:32 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| 31:16 || colspan=8|
|-
| 15:0 || colspan=8|
|}
{{#invoke:Register table|definitions
| 61:56 | command[5:0] | 0x39
| 31:24 |
| 23:16 |
| 15:8 |
| 7:0 |
}}
Sets the "Blend" color register to the provided RGBA value. This color is accessible from the Blender as an input.
====<span style="display:none;">0x3a - Set_Primitive_Color ====▼
The name "Blend" reflects only one particular usage of how the color may be used, the name does not relate to any particular meaning in the hardware.
'''Hazards'''
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old blend color and the new blend color, if it was used.
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="17"|
|-
| 63:48 || — || — || colspan=6| command = 0x3a[5:0] || — || — || — || — || — || — || — || —
|-
| 47:32 || — || — || — || — || colspan=4|
|-
| 31:16 || colspan=8|
|-
| 15:0 || colspan=8|
|}
{{#invoke:Register table|definitions
| 61:56 | command[5:0] | 0x3a
| 43:40 |
| 39:32 |
| 31:24 |
| 23:16 |
| 15:8 |
| 7:0 |
}}
Sets the "Primitive" color register to the provided RGBA value, and some LOD parameters. The color is accessible from the Color Combiner as an input.
====<span style="display:none;">0x3b - Set_Environment_Color ====▼
The name "Primitive" reflects only one particular usage of how the color may be used, the name does not relate to any particular meaning in the hardware.
'''prim_lod_frac''' is simply another Color Combiner input, despite the name it is not used by the texture LOD hardware feature. It may be used as a fixed interpolation factor.
'''min_level''' is used in the texture LOD hardware, it bounds the LOD tile selection from below. The LOD value selecting a particular tile '''N''' can be computed by
<math>L = 32 \cdot 2^{(N - T_{\mathrm{base}})}</math>
where '''T<sub>base</sub>''' is the tile number set in the triangle command. For texture rectangles this is tile 0.
If the LOD computed for a particular pixel during texture sampling is less than the minimum LOD level, tile 0 is used. Detail and sharpen modes may still apply. (TODO link to more detailed Texture LOD article)
Unlike the majority of other attribute-setters, primitive color operates correctly even in the absence of pipeline synchronizations. The primitive color may be changed between primitive rendering without corrupting prior primitives.
----
{| class="wikitable" style="text-align: center; white-space:nowrap;"
! colspan="17"|
|-
| 63:48 || — || — || colspan=6| command = 0x3b[5:0] || — || — || — || — || — || — || — || —
Line 897 ⟶ 938:
| 47:32 || — || — || — || — || — || — || — || — || — || — || — || — || — || — || — || —
|-
| 31:16 || colspan=8|
|-
| 15:0 || colspan=8|
|}
{{#invoke:Register table|definitions
| 61:56 | command[5:0] | 0x3b
| 31:24 |
| 23:16 |
| 15:8 |
| 7:0 |
}}
Sets the "Environment" color register to the provided RGBA value. This color is accessible from the Color Combiner as an input.
The name "Environment" reflects only one particular usage of how the color may be used, the name does not relate to any particular meaning in the hardware.
'''Hazards'''
* This is an attribute-setting command that requires pipeline synchronization before use, otherwise currently rendering primitives may be partially rendered using both the old environment color and the new environment color, if it was used.
====<span style="display:none;">0x3c - Set_Combine_Mode ====
|