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

# `vec4u()`

Function in Builtins

A `vec4<u32>` constructor, WGSL-style: `vec4u`.

`import { vec4u } from 'typeshade/core/ir'`

This export returns an IR node. A `"use typeshade"` file calls the builtin itself: [`vec4u()`](https://typeshade.dev/reference/functions/vec4u/)

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

## Syntax

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

## Parameters

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

## Return value

`Node<'vec4<u32>'>`

## Description

Bare number components lift to `u32`. The shape of a packed unsigned parameter block or a `texture_2d<u32>` texel.

## Examples

### Example

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

const params = vec4u(64, 1, 0, 0)  // Node<'vec4<u32>'>
```

## 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

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

## Source

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