asfloat
Description
Reinterpret bits as a float.
Signature
/// Requires Capability Set 1: float asfloat(int x); /// Requires Capability Set 1: float asfloat(uint x); /// Requires Capability Set 1: vector<float, N> asfloat<N:int>(vector<int, N> x); /// Requires Capability Set 1: vector<float, N> asfloat<N:int>(vector<uint, N> x); /// Requires Capability Set 2: matrix<float, N, M> asfloat<N:int, M:int>(matrix<int, N, M> x); /// Requires Capability Set 2: matrix<float, N, M> asfloat<N:int, M:int>(matrix<uint, N, M> x); float asfloat(float x); vector<float, N> asfloat<N:int>(vector<float, N> x); matrix<float, N, M> asfloat<N:int, M:int>(matrix<float, N, M> x);
Generic Parameters
N : int
M : int
Parameters
x : int
x : uint
x : vector<int, N>
x : vector<uint, N>
x : matrix<int, N, M>
x : matrix<uint, N, M>
x : float
x : vector<float, N>
x : matrix<float, N, M>
Availability and Requirements
Capability Set 1
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
metal
Available in all stages.
wgsl
Available in all stages.
spirv
Available in all stages.
Capability Set 2
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
spirv
Available in all stages.