---
title: "PassTargets: TypeShade 셰이더 API의 런타임 분류 인터페이스 참조 문서"
description: "PassTargets, TypeShade API의 런타임 분류에 속하는 인터페이스입니다. 렌더 패스의 어태치먼트입니다. 텍스처 또는 호스트가 설정한 캔버스 컨텍스트입니다."
url: https://typeshade.dev/ko/api/passtargets/
language: ko
---

# `PassTargets`

인터페이스, 런타임 분류

렌더 패스의 어태치먼트입니다. 텍스처 또는 호스트가 설정한 캔버스 컨텍스트입니다.

`import type { PassTargets } from 'typeshade/runtime'`

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

## 구문

```ts
interface PassTargets {
  readonly color?: readonly ( | Texture | (object & { readonly target?: never }) | { readonly target: Texture | object; /** clearValue. The colour a `'clear'` load writes. Default `[0, 0, 0, 0]`. */ readonly clear?: readonly [number, number, number, number]; /** loadOp. Default `'clear'`. */ readonly load?: 'clear' | 'load'; /** storeOp. Default `'store'`. `'discard'` reads as zero afterwards on both tiers. On WebGL2 it costs one clear of the attachment at pass end. That clear may cost the bandwidth that `'discard'` saves on a tile-based or integrated GPU. The cost is not measured on a device yet. A canvas target refuses `'discard'`. */ readonly store?: 'store' | 'discard'; } )[];
  readonly depth?: Texture | DepthAttachment;
}
```

## 설명

색상 대상은 `Texture`, 컨텍스트, 또는 `{ target, clear, load, store }`이다. `load`의 기본값은 `'clear'`이고, `clear`의 기본값은 투명한 검정, `[0, 0, 0, 0]`입니다. `store`의 기본값은 `'store'`입니다. 깊이 대상은 `Texture` 또는 `DepthAttachment`입니다. 그 `clear`의 기본값은 1이며, 역방향 투영은 이 값을 0으로 둡니다. `load`의 기본값은 `'clear'`이고 `store`의 기본값은 `'store'`입니다.

## 인스턴스 속성

**`color` 선택 사항 읽기 전용 ``readonly ( | Texture | (object & { readonly target?: never }) | { readonly target: Texture | object; /** clearValue. The colour a `'clear'` load writes. Default `[0, 0, 0, 0]`. */ readonly clear?: readonly [number, number, number, number]; /** loadOp. Default `'clear'`. */ readonly load?: 'clear' | 'load'; /** storeOp. Default `'store'`. `'discard'` reads as zero afterwards on both tiers. On WebGL2 it costs one clear of the attachment at pass end. That clear may cost the bandwidth that `'discard'` saves on a tile-based or integrated GPU. The cost is not measured on a device yet. A canvas target refuses `'discard'`. */ readonly store?: 'store' | 'discard'; } )[]``**

탈출구([Rule 11.17](https://typeshade.dev/ko/reference/rules/11-17/))입니다. 호스트의 `GPUTexture` 또는 `GPUTextureView`입니다. 캔버스 컨텍스트도 타깃이 될 수 있다(WebGPU. WebGL2에서는 런타임 자신의 컨텍스트나 캔버스만 해당합니다).

**`depth` 선택 사항 읽기 전용 `Texture | DepthAttachment`**

## 소스

[`src/runtime/runtime.ts`, 101행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/runtime.ts#L101), 커밋 af54ddad5 기준
