---
title: "TextureOptions: interface in Runtime, TypeShade API"
description: "TextureOptions, an interface in Runtime. What rt.texture() makes. format is any GPUTextureFormat the device can render to or sample: rgba8unorm, rgba16float…"
url: https://typeshade.dev/api/textureoptions/
language: en
---

# `TextureOptions`

Interface in Runtime

What rt.texture() makes. format is any GPUTextureFormat the device can render to or sample: rgba8unorm, rgba16float, depth24plus, r32float.

`import type { TextureOptions } from 'typeshade/runtime'`

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

## Syntax

```ts
interface TextureOptions {
  readonly size: readonly [number, number] | readonly [number, number, number];
  readonly format: string;
  readonly dimension?: '2d' | '3d';
  readonly sampleCount?: number;
  readonly storage?: boolean;
}
```

## Instance properties

**`size` read only `readonly [number, number] | readonly [number, number, number]`**

`[width, height]`, or `[width, height, layers]` for an array or a 3D texture.

**`format` read only `string`**

**`dimension` optional read only `'2d' | '3d'`**

`'2d'` (the default) or `'3d'`. A texture is a render target and a sampled texture at once, and one with a single sample can be copied to and from.

**`sampleCount` optional read only `number`**

4 for a multisampled render target; 1, the default, otherwise.

**`storage` optional read only `boolean`**

Add `STORAGE_BINDING`, for a storage texture an entry writes.

## Source

[`src/runtime/resources.ts`, line 17](https://github.com/typeshade/typeshade/blob/af54ddad5/src/runtime/resources.ts#L17), at commit af54ddad5
