pack4x8unorm()
Function in Builtins
Pack a vec4<f32> into a u32 RGBA8.
import { pack4x8unorm } from 'typeshade/core/ir'
This export returns an IR node. A "use typeshade" file calls the builtin itself: pack4x8unorm()
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const pack4x8unorm: (v: ReadonlyNode<"vec4<f32>">) => Node<"u32">Parameters
vReadonlyNode<'vec4<f32>'>
Return value
Node<'u32'>
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Supported |
|
| GLSL ES 3.00 (WebGL2) | Supported |
|
| CPU oracle | Supported | Evaluated in |
See also
Source
src/core/ir/node.ts, line 1631, at commit af54ddad5