---
title: "texture2duT: constant in Types, TypeShade API reference"
description: "texture2duT, a constant in Types. An unsigned-integer 2D texture. The type keys and type descriptors the authoring surface is typed by."
url: https://typeshade.dev/api/texture2dut/
language: en
---

# `texture2duT`

Constant in Types

An unsigned-integer 2D texture.

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

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const texture2duT: { readonly kind: "texture"; readonly dim: "2d"; readonly elem: "u32"; }
```

## Description

Read it with [`textureLoad`](https://typeshade.dev/api/textureload/), which returns a `vec4<u32>`. It carries exact 32-bit values, which makes it the right backing for an id, packed-colour or bitfield lookup that must reach the GPU unchanged. It is unfilterable: [`textureSample`](https://typeshade.dev/api/texturesample/) on it is a `tsc` error (see [`TextureElem`](https://typeshade.dev/api/textureelem/)).

## See also

- [`textureLoad`](https://typeshade.dev/api/textureload/)
- [`textureSample`](https://typeshade.dev/api/texturesample/)
- [`TextureElem`](https://typeshade.dev/api/textureelem/)

## Source

[`src/core/ir/types/texture-types.ts`, line 49](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/types/texture-types.ts#L49), at commit af54ddad5
