---
title: renderTarget
framework: metal
role: symbol
role_heading: Type Property
path: metal/mtltextureusage/rendertarget
---

# renderTarget

An option for rendering to the texture in a render pass.

## Declaration

```swift
static var renderTarget: MTLTextureUsage { get }
```

## Mentioned in

Developing Metal apps that run in Simulator Optimizing texture data

## Discussion

Discussion Set this option if you use the given texture as a color, depth, or stencil render target in any render pass. This option allows you to assign the texture to the texture property of an MTLRenderPassAttachmentDescriptor. important: Rendering and writing to a texture are different operations, and you don’t need to combine their usage options. Set the renderTarget option if you render to a given texture, but don’t set the shaderWrite option if you don’t write to the texture. The renderTarget and shaderWrite options aren’t equivalent, and setting renderTarget doesn’t require you to also set shaderWrite.

## See Also

### Specifying texture usage options

- [unknown](metal/mtltextureusage/unknown.md)
- [shaderRead](metal/mtltextureusage/shaderread.md)
- [shaderWrite](metal/mtltextureusage/shaderwrite.md)
- [shaderAtomic](metal/mtltextureusage/shaderatomic.md)
- [pixelFormatView](metal/mtltextureusage/pixelformatview.md)
