Source Register Invert
Microsoft DirectX 9.0 SDK Update (October 2004)

Source Register Invert


Performs a (1 - value) calculation for each channel of the specified register.

Syntax

1 - register

Registers

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. The invert operation is applied to all four color channels (RGBA).

This modifier can be used only with arithmetic instructions. In addition, this modifier cannot be combined with the other Pixel Shader Source Register Modifiers.

Example

This example uses inversion to generate the complement of register r1.

mul r0, r0, 1-r1;


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