---
title: "sampler: type in the TypeShade language reference"
description: "sampler, a type in the TypeShade language reference. A sampler: how a sampled texture is filtered and addressed when textureSample reads it."
url: https://typeshade.dev/reference/types/sampler/
language: en
---

# `sampler`

Type

A sampler: how a sampled texture is filtered and addressed when `textureSample` reads it.

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

## Syntax

```ts
type sampler = { readonly [samplerTag]: true }
```

## Description

A resource with no type argument, declared bare as `declare const smp: sampler`.

## Examples

- [`gallery/cube-array-gather/cube-array-gather.shade.ts`](https://typeshade.dev/guide/examples/cube-array-gather/)
- [`gallery/cube-env/cube-env.shade.ts`](https://typeshade.dev/guide/examples/cube-env/)
- [`gallery/sample-branch/sample-branch.shade.ts`](https://typeshade.dev/guide/examples/sample-branch/)
- [`gallery/separable-blur/separable-blur.shade.ts`](https://typeshade.dev/guide/examples/separable-blur/)
- [`gallery/textured-quad/textured-quad.shade.ts`](https://typeshade.dev/guide/examples/textured-quad/)

## See also

- [Types](https://typeshade.dev/reference/types/)
