---
title: vertexFunction
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpipelinedescriptor/vertexfunction
---

# vertexFunction

The vertex function the pipeline calls to process vertices.

## Declaration

```swift
var vertexFunction: (any MTLFunction)? { get set }
```

## Discussion

Discussion The default value is nil. The vertex function needs to be specified. The vertex function can be either a regular vertex function or a post-tessellation vertex function.

## See Also

### Specifying graphics functions and associated data

- [fragmentFunction](metal/mtlrenderpipelinedescriptor/fragmentfunction.md)
- [maxVertexCallStackDepth](metal/mtlrenderpipelinedescriptor/maxvertexcallstackdepth.md)
- [maxFragmentCallStackDepth](metal/mtlrenderpipelinedescriptor/maxfragmentcallstackdepth.md)
