---
title: "location: \"use typeshade\" 파일에서 쓰는 타입 이름 하나, TypeShade 언어 참조"
description: "location (타입), TypeShade 언어 참조 항목입니다. A shader IO location of type T, at the number written: uv: location<0, vec2>."
url: https://typeshade.dev/ko/reference/types/location/
language: ko
---

# `location`

타입

A shader IO location of type `T`, at the number written: `uv: location<0, vec2>`.

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

## 구문

```ts
type location<I extends number, T, O extends { readonly interpolate?: 'perspective' | 'linear' | 'flat' | readonly [type: 'perspective' | 'linear' | 'flat', sampling: 'center' | 'centroid' | 'sample' | 'first' | 'either']; readonly blend_src?: 0 | 1 } = {}> = T
```

## 매개변수

- `I` `number`
- `T`
- `O` 선택 사항 `{ readonly interpolate?: 'perspective' | 'linear' | 'flat' | readonly [type: 'perspective' | 'linear' | 'flat', sampling: 'center' | 'centroid' | 'sample' | 'first' | 'either']; readonly blend_src?: 0 | 1 }`

## 설명

An input or output that writes none, `uv: vec2`, takes its location from the compiler; write `location<n, T>` to fix the number or to carry an option. Options: `{ interpolate: "flat" }` or `{ interpolate: ["linear", "centroid"] }`, and `{ blend_src: 0 | 1 }` on a field of a dual-source fragment output struct.

## 예제

- [`gallery/id-pick/id-pick.shade.ts`](https://typeshade.dev/ko/guide/examples/id-pick/)
- [`gallery/twin-structs/twin-structs.shade.ts`](https://typeshade.dev/ko/guide/examples/twin-structs/)

## 함께 보기

- [타입](https://typeshade.dev/ko/reference/types/)
