vec3u()
Function in Builtins
A vec3<u32> constructor, WGSL-style: vec3u(x, y, z).
import { vec3u } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const vec3u: (...a: NodeLike[]) => Node<"vec3<u32>">Parameters
...aNodeLike[]
Return value
Node<'vec3<u32>'>
Description
Bare number components lift to u32,
where vec3 lifts them to f32. It is the type of the compute global_invocation_id
builtin, so this is how a workgroup coordinate is built by hand.
Examples
Example
import { vec3u } from 'typeshade'
const origin = vec3u(0, 0, 0) // Node<'vec3<u32>'>In the guide
See also
Source
src/core/ir/node.ts, line 2568, at commit 26de7be8