pow

Returns the specified value raised to the specified power.

ret pow(x, y)

 

Parameters

ItemDescription

x

[in] The specified value.

y

[in] The specified power.

 

Return Value

The x parameter raised to the power of the y parameter.

Remarks

The pow HLSL intrinsic function calculates xy.

XYResult
< 0anyNAN
> 0 == 01
== 0> 00
== 0< 0inf
> 0< 01/X-Y
== 0== 0

Depends on the particular graphics processor

0 or NAN

 

Type Description

Name Template Type Component Type Size
xscalar, vector, or matrix float any
ysame as input x float same dimension(s) as input x
retsame as input x float same dimension(s) as input x

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 2 (DirectX HLSL) and higher shader modelsyes
Shader Model 1 (DirectX HLSL) yes (vs_1_1 only)

 

See also

Intrinsic Functions (DirectX HLSL)

 

 

Show: