ftou (sm4 - asm)

Floating point to unsigned integer conversion.

ftou dest[.mask], [-]src0[_abs][.swizzle]
ftoi dest[.mask], [-]src0[_abs][.swizzle]
Item Description
dest
[in] The address of the result of the operation.
src0
[in] The value to convert.

Remarks

The conversion is performed per-component. Rounding is always performed towards zero, following the C convention for casts from float to int.

Applications that require different rounding semantics can invoke the round instructions before casting to integer.

Inputs are clamped to the range [0.0f ... 4294967295.999f] prior to conversion, and input NaN values produce a zero result.

Optional negate and absolute value modifiers are applied to the source values before conversion.

This instruction applies to the following shader stages:

Vertex Shader Geometry Shader Pixel Shader
x x x

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
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

Shader Model 4 Assembly (DirectX HLSL)