texreg2ar - ps
Microsoft DirectX 9.0 SDK Update (October 2004)

texreg2ar - ps


Interprets the alpha and red color components of the source register as texture address data (u,v) to sample the texture at the stage corresponding to the destination register number. The result is stored in the destination register.

Syntax

texreg2ar dst, src

where

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
texreg2arxxx

This instruction is useful for color-space remapping operations.

Here is an example of the sequence the instruction follows.

tex t(n)
texreg2ar t(m), t(n)     where m > n

// 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)AR as coordinates

_bx2 cannot be used on the src register for texreg2ar or texreg2gb 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.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.