bitcastU32()
Function in Builtins
Reinterpret the bit pattern of an f32 as a u32.
import { bitcastU32 } from 'typeshade/core/ir'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const bitcastU32: (v: ReadonlyNode<"f32">) => Node<"u32">Parameters
vReadonlyNode<'f32'>
Return value
Node<'u32'>
Description
Emitted as bitcast<u32>(x) on WGSL and
floatBitsToUint(x) on GLSL.
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Supported |
|
| GLSL ES 3.00 (WebGL2) | Supported |
|
| CPU oracle | Supported | Evaluated in |
Source
src/core/ir/node.ts, line 1681, at commit af54ddad5