---
title: "texture_storage_2d: TypeShade 언어 참조에 실린 타입 이름과 그 시그니처"
description: "texture_storage_2d (타입), TypeShade 언어 참조 항목입니다. A 2D storage texture, read and written by texel coordinate with textureLoad and textureStore, with no sampler."
url: https://typeshade.dev/ko/reference/types/texture_storage_2d/
language: ko
---

# `texture_storage_2d`

타입

A 2D storage texture, read and written by texel coordinate with `textureLoad` and `textureStore`, with no sampler.

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

## 구문

```ts
type texture_storage_2d<
  F extends StorageFormat,
  A extends StorageAccess = 'write',
> = A extends 'write'
  ? { readonly [storageTextureTag]: readonly [F, A, false] }
  : F extends WriteOnlyStorageFormat
    ? never
    : A extends 'read_write'
      ? F extends ReadWriteStorageFormat
        ? { readonly [storageTextureTag]: readonly [F, A, false] }
        : never
      : { readonly [storageTextureTag]: readonly [F, A, false] }
```

시그니처에는 앰비언트 파일이 스스로 쓰려고 선언한 타입이 나올 수 있습니다. 아래가 그 선언입니다.

**`StorageFormat`**

`type StorageFormat = 'rgba8unorm' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'rgba16uint' | 'rgba16sint' | 'rgba16float' | 'r32uint' | 'r32sint' | 'r32float' | 'rg32uint' | 'rg32sint' | 'rg32float' | 'rgba32uint' | 'rgba32sint' | 'rgba32float' | 'bgra8unorm'`

**`StorageAccess`**

`type StorageAccess = 'write' | 'read' | 'read_write'`

**`ReadWriteStorageFormat`**

`type ReadWriteStorageFormat = 'r32uint' | 'r32sint' | 'r32float'`

**`WriteOnlyStorageFormat`**

`type WriteOnlyStorageFormat = 'bgra8unorm'`

## 매개변수

- `F` `StorageFormat`
- `A` 선택 사항 `StorageAccess`

## 설명

Its format and access mode are its type arguments, as in `declare const dst: texture_storage_2d<"rgba8unorm", "write">`; in a render entry its GLSL lowering is not supported yet ([Rule 10.5](https://typeshade.dev/ko/reference/rules/10-5/)), and a `@compute` entry runs it on WebGL2 as its pass program ([Rule 8.24](https://typeshade.dev/ko/reference/rules/8-24/), [Rule 11.8](https://typeshade.dev/ko/reference/rules/11-8/)).

## 예제

- [`gallery/kernel-image-invert/kernel-image-invert.shade.ts`](https://typeshade.dev/ko/guide/examples/kernel-image-invert/)
- [`gallery/storage-texture/storage-texture.shade.ts`](https://typeshade.dev/ko/guide/examples/storage-texture/)

## 함께 보기

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