---
title: "samplerT: constant in Types, TypeShade API reference"
description: "samplerT, a constant in Types. The sampler resource type. The type keys and type descriptors the authoring surface is typed by."
url: https://typeshade.dev/api/samplert/
language: en
---

# `samplerT`

Constant in Types

The sampler resource type.

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

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

## Syntax

```ts
const samplerT: { readonly kind: "sampler"; }
```

## Description

Always declared as its own `resource()` binding next to a texture type ([`texture2dfT`](https://typeshade.dev/api/texture2dft/) and its siblings); [`textureSample`](https://typeshade.dev/api/texturesample/) and [`textureSampleLevel`](https://typeshade.dev/api/texturesamplelevel/) take both. For example, `resource('atlas_sampler', samplerT, { group: 0, binding: 1 })`.

## See also

- [`texture2dfT`](https://typeshade.dev/api/texture2dft/)
- [`textureSample`](https://typeshade.dev/api/texturesample/)
- [`textureSampleLevel`](https://typeshade.dev/api/texturesamplelevel/)

## Source

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