---
title: "vec4i(): IR builder function in typeshade/core/ir, TypeShade"
description: "vec4i, an IR builder function in typeshade/core/ir. A vec4<i32> constructor, WGSL-style: vec4i."
url: https://typeshade.dev/api/vec4i/
language: en
---

# `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()`](https://typeshade.dev/reference/functions/vec4i/)

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const vec4i: (...a: NodeLike[]) => Node<"vec4<i32>">
```

## Parameters

**`...a` `NodeLike[]`**

## Return value

`Node<'vec4<i32>'>`

## Description

Bare number components lift to `i32`. The signed counterpart of [`vec4u`](https://typeshade.dev/api/vec4u/), and the texel type of a `texture_2d<i32>`.

## Examples

### Example

```ts
import { vec4i } from 'typeshade/core/ir'

const texel = vec4i(0, 0, 0, 1)  // Node<'vec4<i32>'>
```

## In the guide

- [Values and mutation](https://typeshade.dev/guide/internals/values-and-mutation/)
- [Layouts and resources](https://typeshade.dev/guide/internals/layouts-and-resources/)

## See also

- [`vec4i()`](https://typeshade.dev/reference/functions/vec4i/)
- [`vec4u`](https://typeshade.dev/api/vec4u/)

## Source

[`src/core/ir/node.ts`, line 2330](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2330), at commit af54ddad5
