# TextureView

Class · category: Graphics

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/platform/graphics/texture-view.js#L19

A TextureView specifies a texture and a subset of its mip levels and array layers. It is used
when binding textures to compute shaders to specify which portion of the texture should be
accessed. Create a TextureView using [Texture#getView](https://api.playcanvas.com/engine/classes/Texture.md#getview).

Note: TextureView is only supported on WebGPU. On WebGL, the full texture is always bound and
this class has no effect.

## Properties

### arrayLayerCount

```ts
readonly arrayLayerCount: number
```

The number of array layers accessible to the view.

### baseArrayLayer

```ts
readonly baseArrayLayer: number
```

The first array layer accessible to the view.

### baseMipLevel

```ts
readonly baseMipLevel: number
```

The first mip level accessible to the view.

### mipLevelCount

```ts
readonly mipLevelCount: number
```

The number of mip levels accessible to the view.

### texture

```ts
readonly texture: Texture
```

The texture this view references.
