---
title: "sampler_comparison: type in the TypeShade language reference"
description: "sampler_comparison, a type in the TypeShade language reference. A comparison sampler…"
url: https://typeshade.dev/reference/types/sampler_comparison/
language: en
---

# `sampler_comparison`

Type

A comparison sampler: compares a reference depth against a depth texture in `textureSampleCompare`, the read a shadow map takes.

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

## Syntax

```ts
type sampler_comparison = { readonly [samplerComparisonTag]: true }
```

## Description

Declared bare as `declare const shadowSmp: sampler_comparison`.

## 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/shadow-compare/shadow-compare.shade.ts`](https://typeshade.dev/guide/examples/shadow-compare/)

## See also

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