?/TD> |
Microsoft DirectX 9.0 |
Use source register modifiers to change the value read from a register before an instruction runs. The contents of a source register are left unchanged. Modifiers are useful for adjusting the range of register data in preparation for the instruction. A set of modifiers called selectors copies or replicates the data from a single channel (r,g,b,a) into the other channels.
Version 1_4 shaders have modifier functionality specific to shader instructions texld and texcrd. These modifiers affect version 1_4 texture registers and are detailed in Texture Register Modifiers.
Source register modifiers | Syntax | Version | |||||
---|---|---|---|---|---|---|---|
1_1 | 1_2 | 1_3 | 1_4 | ||||
register_bias | X | X | X | X | |||
1 - register | X | X | X | X | |||
- register | X | X | X | X | |||
register_x2 | X | ||||||
register_bx2 | X | X | X | X |
Source register modifiers can be used only on arithmetic instructions. They cannot be used on texture address instructions. The exception to this is the Scale x 2 modifier (_bx2). For version 1_1, signed scale can be used on the source argument of any texm* instruction. For version 1_2 or 1_3, signed scale can be used on the source argument of any texture address instruction.
Some modifier specific restrictions: