---
title: "vec4u(): typeshade/core/ir의 IR 빌더 함수, TypeShade 컴파일러 API"
description: "vec4u, typeshade/core/ir의 IR 빌더 함수입니다. vec4<u32> 생성자이며, WGSL 방식으로 vec4u라고 씁니다."
url: https://typeshade.dev/ko/api/vec4u/
language: ko
---

# `vec4u()`

함수, 내장 함수 분류

`vec4<u32>` 생성자이며, WGSL 방식으로 `vec4u`라고 씁니다.

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

이 export는 IR 노드를 반환합니다. `"use typeshade"` 파일에서는 내장 함수 자체를 부릅니다: [`vec4u()`](https://typeshade.dev/ko/reference/functions/vec4u/)

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

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

## 매개변수

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

## 반환값

`Node<'vec4<u32>'>`

## 설명

일반 숫자 성분은 `u32`로 승격됩니다. 패킹된 부호 없는 매개변수 블록이나 `texture_2d<u32>`의 텍셀은 이 타입의 형태를 띱니다.

## 예제

### 예제

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

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

## 관련 가이드

- [값과 변경](https://typeshade.dev/ko/guide/internals/values-and-mutation/)
- [레이아웃과 리소스](https://typeshade.dev/ko/guide/internals/layouts-and-resources/)

## 함께 보기

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

## 소스

[`src/core/ir/node.ts`, 2302행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2302), 커밋 af54ddad5 기준
