vec4i()
Function in Builtins
A vec4<i32> constructor, WGSL-style: vec4i.
import { vec4i } from 'typeshade/core/ir'
This export returns an IR node. A "use typeshade" file calls the builtin itself: vec4i()
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const vec4i: (...a: NodeLike[]) => Node<"vec4<i32>">Parameters
...aNodeLike[]
Return value
Node<'vec4<i32>'>
Description
Bare number components lift to
i32. The signed counterpart of vec4u, and the texel type of a texture_2d<i32>.
Examples
Example
import { vec4i } from 'typeshade/core/ir'
const texel = vec4i(0, 0, 0, 1) // Node<'vec4<i32>'>In the guide
See also
Source
src/core/ir/node.ts, line 2330, at commit af54ddad5