title | description | ms.assetid | keywords | topic_type | api_name | api_type | ms.topic | ms.date | api_location | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f32tof16 function |
Converts an input into a float16 type. |
45505fe2-e8ec-4659-b7c1-a506d89e8213 |
|
|
|
|
reference |
05/31/2018 |
Converts an input into a float16 type.
uint f32tof16(
in float value
);
-
value [in]
-
Type: float
The input value.
Type: uint
The converted value, stored in the low-half of the uint.
The following overloaded versions are also available:
uint2 f32tof16(float2 value);
uint3 f32tof16(float3 value);
uint4 f32tof16(float4 value);
This function is supported in the following shader models.
Shader Model | Supported |
---|---|
Shader Model 4 and higher shader models | yes |
Although this function is available in Shader Model 4 and higher shader models, because it is emulated in 4.0 and 4.1, it is less perfomant on these shader models than it is on Shader Model 5.
This function is supported in the following types of shaders:
Vertex | Hull | Domain | Geometry | Pixel | Compute |
---|---|---|---|---|---|
x | x | x | x | x | x |