---
title: depthStencilTexture
framework: metalkit
role: symbol
role_heading: Instance Property
path: metalkit/mtkview/depthstenciltexture
---

# depthStencilTexture

A packed depth and stencil texture associated with the current drawable object’s texture.

## Declaration

```swift
var depthStencilTexture: (any MTLTexture)? { get }
```

## Discussion

Discussion The value of depthStencilPixelFormat determines the format of this texture. The default value is nil. This value is also nil if the specified pixel format is MTLPixelFormat.invalid.

## See Also

### Retrieving Render Target Information

- [currentRenderPassDescriptor](metalkit/mtkview/currentrenderpassdescriptor.md)
- [currentDrawable](metalkit/mtkview/currentdrawable.md)
- [depthStencilStorageMode](metalkit/mtkview/depthstencilstoragemode.md)
- [multisampleColorTexture](metalkit/mtkview/multisamplecolortexture.md)
