abs - ps

Computes absolute value.

Syntax

abs dst, src

where

  • dst is the destination register.
  • src is a source register.

Remarks

Pixel shader versions 1_1 1_2 1_3 1_4 2_0 2_x 2_sw 3_0 3_sw
abs x x x x x

 

This instruction works as shown here.

dest.x = abs(src.x)
dest.y = abs(src.y)
dest.z = abs(src.z)
dest.w = abs(src.w)

Instruction Information

Requirement Value
Minimum operating system Windows 98

 

Pixel Shader Instructions