Upravit

Sdílet prostřednictvím


Source Register Negate

Performs a negate (y = -x), on all register components.

Syntax

- register

Registers

Source Register. For more about register types, see ps_1_1__ps_1_2__ps_1_3__ps_1_4 Registers.

Remarks

The contents of the register are not changed. The modifier is applied only to the data read from the register. The negate operation is applied to all four color channels (RGBA).

This operation is performed after any other modifiers present on the same argument.

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

This modifier is for use only with arithmetic instructions.

Example

The following example shows how to use this modifier.

mul r0, r0, -v1;

Pixel Shader Source Register Modifiers