Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Floating point to signed integer conversion.
ftoi dest[.mask], [-]src0[_abs][.swizzle] |
---|
Item | Description |
---|---|
dest |
[in] The address of the result of the operation. dest = round_z(src0) |
src0 |
[in] The component 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 [-2147483648.999f ... 2147483647.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 |