Microsoft Directx 8.1 (pixel shader versions 1.0, 1.1, 1.2, 1.3, 1.4)

Negate

- source register

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

Register

Source register. For more about register types, see 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 Invert so it cannot be applied to the same register.

This modifier is for use with the arithmetic instructions.

Example

The following example shows how to use this modifier.

mul r0, r0, -v1    ; Multiply by specular color.