rsq - ps

Computes the reciprocal square root (positive only) of the source scalar.

Syntax

rsq dst, src

 

where

  • dst is the destination register.
  • src is a source register. Source register requires explicit use of replicate swizzle, that is, exactly one of the .x, .y, .z, .w swizzle components (or the .r, .g, .b, .a equivalents) must be specified.

Remarks

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

 

The absolute value is taken before processing.

Precision should be at least 1.0/(2²²) absolute error over the range (1.0, 4.0) because common implementations will separate mantissa and exponent.

The output must be exactly 1.0 if the input is exactly 1.0. A source of 0.0 yields infinity.

Pixel Shader Instructions