---
title: stencilAttachmentPixelFormat
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpipelinedescriptor/stencilattachmentpixelformat
---

# stencilAttachmentPixelFormat

The pixel format of the attachment that stores stencil data.

## Declaration

```swift
var stencilAttachmentPixelFormat: MTLPixelFormat { get set }
```

## Discussion

Discussion By default, the pixel format of the rendering pipeline state for each attachment is MTLPixelFormatInvalid.

## See Also

### Specifying rendering pipeline state

- [reset()](metal/mtlrenderpipelinedescriptor/reset().md)
- [colorAttachments](metal/mtlrenderpipelinedescriptor/colorattachments.md)
- [depthAttachmentPixelFormat](metal/mtlrenderpipelinedescriptor/depthattachmentpixelformat.md)
