Negate

Flips the sign of the value of a source operand used in an arithmetic operation.

-

 

For single and double precision floating point and instructions, the negate modifier flips the sign of the number(s) in the source operand, including on INF values. Applying negate on NaN preserves NaN, although the particular NaN bit pattern that results is not defined.

For integer instructions, the negate modifier takes the 2's complement of the number(s) in the source operand.

Minimum Shader Model

This modifier is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

Related topics

Instruction Modifiers

 

 

Show: