bitcastU32()
Function in Builtins
Reinterpret the bit pattern of an f32 as a u32.
import { bitcastU32 } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
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 f64 by the oracle. |
Source
src/core/ir/node.ts, line 1924, at commit 26de7be8