rcp

Calculates a fast, approximate, per-component reciprocal.

ret rcp(x)

 

Parameters

x

[in] The input value.

Return Value

The reciprocal of the x parameter.

Type Description

Name Template Type Component Type Size
x scalar, vector, or matrix float or double any
ret same as input x float or double same dimension(s) as input x

 

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 5 and higher shader models yes

 

This function is supported in the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute
x x x x x x

 

See also

Intrinsic Functions

Shader Model 5