?/TD> |
Microsoft DirectX 9.0 |
Interprets the green and blue color components of the source register as texture address data to sample the texture at the stage corresponding to the destination register number.
Syntax
texreg2gb (Pixel Shader) dest, src
Registers
- dest
- Destination register.
- src
- Input source register.
Remarks
Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw texreg2gb x x This instruction is useful for color-space remapping operations.
Here is an example of the sequence the instruction follows.
// Here is an example of the sequence the instruction follows. tex t(n) texreg2gb t(m), t(n) where m > n // Here is more detail about how the remapping is accomplished. // The first instruction loads the texture color (RGBA) // into register tn. tex tn // The second instruction remaps the color. t(m)RGBA = TextureSample(stage m)RGBA using t(n)GB as coordinates._bx2 cannot be used on the src register for texreg2ar or texreg2gb (Pixel Shader) instructions.
For this instruction, the source register must use unsigned data. Use of signed or mixed data in the source register will produce undefined results. For more information, see D3DFORMAT.
Instruction Information
Minimum operating systems Windows 98