Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Pixel shaders depend on registers to get vertex data, to output pixel data, to hold temporary results during calculations, and to identify texture sampling stages. There are several types of registers, each with a unique functionality. This section contains reference information for the input and output registers implemented by pixel shader version 2_x.
Register | Name | Count | R/W | # Read ports | # Reads/inst | Dimension | RelAddr | Defaults | Requires DCL |
---|---|---|---|---|---|---|---|---|---|
v# | Input Color Register | 2 | R | 1 | Unlimited | 4 | N | Partial(0001). See note 4 | Y |
r# | Temporary Register | See note 1 | R/W | 3 | Unlimited | 4 | N | None | N |
c# | Constant Float Register | 32 | R | 1 | 2 | 4 | N | 0000 | N |
i# | Constant Integer Register | 16 | See note 2 | 1 | 1 | 4 | N | 0000 | N |
b# | Constant Boolean Register | 16 | See note 2 | 1 | 1 | 1 | N | FALSE | N |
p0 | Predicate Register | 1 | See note 2 | 1 | 1 | 1 | N | None | Y |
s# | Sampler (Direct3D 9 asm-ps) | 16 | See note 3 | 1 | 1 | 4 | N | See note 5 | Y |
t# | Texture Coordinate Register | 8 | R | 1 | 1 | 4 | N | None | Y |
Notes:
The number of readports is the number of different registers (for each register type) that can be read in a single instruction.
Register | Name | Count | R/W | Dimension | RelAddr | Defaults | Requires DCL |
---|---|---|---|---|---|---|---|
oC# | Output Color Register | See Multiple-element Textures (Direct3D 9) | W | 4 | N | None | N |
oDepth | Output Depth Register | 1 | W | 1 | N | None | N |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today