Source Register Scale x 2
Microsoft DirectX 9.0 SDK Update (October 2004)

Source Register Scale x 2


Multiply the value by two before using it in the instruction.

Syntax

register_x2

Register

Source register. For more about register types, see ps_1_X Registers.

Remarks

The contents of the register are not changed. The modifier is applied only to the data read from the register.

This modifier is mutually exclusive with Source Register Invert, so it cannot be applied to the same register.

This modifier is only available to arithmetic instructions in version 1_4.

Example

This example samples a texture, converts data to the range of -1 to +1, and calculates a dot product.

mul r0, r0, r1_x2;


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