---
title: "내장 값, \"use typeshade\" 파일에서 쓰는 이름을 모은 TypeShade 언어 참조"
description: "파이프라인이 셰이더에 넘겨주거나 셰이더에서 돌려받는 값을 가리키는 `builtin<N>`의 아이디 18개입니다. WGSL이 정해 둔 타입과 쓰이는 스테이지를 함께 적었습니다."
url: https://typeshade.dev/ko/reference/builtin-values/
language: ko
---

# 내장 값

이름 18개

`builtin<N>`이 가리키는 아이디와 각각이 속한 스테이지입니다.

시그니처와 이름 아래 문장, 컴파일러 메시지는 커밋 af54ddad5의 컴파일러가 쓴 영어 원문입니다.

**[`@builtin("vertex_index")`](https://typeshade.dev/ko/reference/builtin-values/vertex_index/)**

The index of the current vertex within its draw call.

**[`@builtin("instance_index")`](https://typeshade.dev/ko/reference/builtin-values/instance_index/)**

The index of the current instance within its draw call.

**[`@builtin("position")`](https://typeshade.dev/ko/reference/builtin-values/position/)**

The vertex's clip-space position (vertex output) or the fragment's window-space position (fragment input).

**[`@builtin("front_facing")`](https://typeshade.dev/ko/reference/builtin-values/front_facing/)**

Whether the current fragment belongs to a front-facing primitive.

**[`@builtin("frag_depth")`](https://typeshade.dev/ko/reference/builtin-values/frag_depth/)**

Overrides the fragment's depth value.

**[`@builtin("sample_index")`](https://typeshade.dev/ko/reference/builtin-values/sample_index/)**

The index of the sample currently being processed, under multisampling.

**[`@builtin("sample_mask")`](https://typeshade.dev/ko/reference/builtin-values/sample_mask/)**

The set of samples covered by the current fragment invocation.

**[`@builtin("primitive_index")`](https://typeshade.dev/ko/reference/builtin-values/primitive_index/)**

The index of the primitive the current fragment belongs to.

**[`@builtin("local_invocation_id")`](https://typeshade.dev/ko/reference/builtin-values/local_invocation_id/)**

The current invocation's id within its workgroup, as a 3-component vector.

**[`@builtin("local_invocation_index")`](https://typeshade.dev/ko/reference/builtin-values/local_invocation_index/)**

The current invocation's flattened index within its workgroup.

**[`@builtin("global_invocation_id")`](https://typeshade.dev/ko/reference/builtin-values/global_invocation_id/)**

The current invocation's id across the entire compute dispatch.

**[`@builtin("workgroup_id")`](https://typeshade.dev/ko/reference/builtin-values/workgroup_id/)**

The id of the current invocation's workgroup within the dispatch.

**[`@builtin("num_workgroups")`](https://typeshade.dev/ko/reference/builtin-values/num_workgroups/)**

The number of workgroups dispatched, as given to the dispatch call.

**[`@builtin("subgroup_invocation_id")`](https://typeshade.dev/ko/reference/builtin-values/subgroup_invocation_id/)**

The current invocation's index within its subgroup.

**[`@builtin("subgroup_size")`](https://typeshade.dev/ko/reference/builtin-values/subgroup_size/)**

The number of invocations in the current subgroup.

**[`@builtin("subgroup_id")`](https://typeshade.dev/ko/reference/builtin-values/subgroup_id/)**

The current subgroup's index within its workgroup.

**[`@builtin("num_subgroups")`](https://typeshade.dev/ko/reference/builtin-values/num_subgroups/)**

The number of subgroups in the current workgroup.

**[`@builtin("clip_distances")`](https://typeshade.dev/ko/reference/builtin-values/clip_distances/)**

Per-vertex clip distances against the pipeline's enabled user clip planes: a vertex output of `array<f32, N>` with N from 1 to 8.

이름, 선언과 설명은 고정된 커밋의 컴파일러 언어 서비스에서 가져옵니다. 내장 함수의 출력 표기와 스테이지 규칙은 컴파일러 코드에서 읽습니다. 항목의 묶음과 이 페이지의 보충 설명은 사이트에서 작성했습니다.
