?/TD>
Microsoft DirectX 9.0

Negate


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

Syntax

- source register

Registers

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

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.


© 2002 Microsoft Corporation. All rights reserved.