Expand description
Traits and helper functions related to floats.
Traits§
- Float
- Abstract trait representing a SPIR-V floating point type.
Functions§
- f16_
to_ f32 - Converts an f16 (half) into an f32 (float). The parameter is a u32, due to GPU support for u16 not being universal - the upper 16 bits are ignored.
- f16x2_
to_ vec2 - Converts two f16 values (halfs) into two f32 values (floats). The parameter is a u32, with the low 16 bits being the first f16, and the high 16 bits being the second f16.
- f32_
to_ f16 - Converts an f32 (float) into an f16 (half). The result is a u32, not a u16, due to GPU support for u16 not being universal - the upper 16 bits will always be zero.
- u8x4_
to_ vec4_ snorm - Unpacks 4 8-bit signed integers into a vec4. See UnpackSnorm4x8 for exact semantics.
- u8x4_
to_ vec4_ unorm - Unpacks 4 8-bit unsigned integers into a vec4. See UnpackSnorm4x8 for exact semantics.
- u16x2_
to_ vec2_ snorm - Unpacks 2 16-bit signed integers into a vec2. See UnpackSnorm2x16 for exact semantics.
- u16x2_
to_ vec2_ unorm - Unpacks 2 16-bit unsigned integers into a vec2. See UnpackUnorm2x16 for exact semantics.
- vec2_
to_ f16x2 - Converts two f32 values (floats) into two f16 values (halfs). The result is a u32, with the low 16 bits being the first f16, and the high 16 bits being the second f16.
- vec2_
to_ u16x2_ snorm - Packs a vec2 into 2 16-bit signed integers. See PackSnorm2x16 for exact semantics.
- vec2_
to_ u16x2_ unorm - Packs a vec2 into 2 16-bit unsigned integers. See PackUnorm2x16 for exact semantics.
- vec4_
to_ u8x4_ snorm - Packs a vec4 into 4 8-bit signed integers. See PackSnorm4x8 for exact semantics.
- vec4_
to_ u8x4_ unorm - Packs a vec4 into 4 8-bit unsigned integers. See PackUnorm4x8 for exact semantics.