---
title: sampleCount
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrasterizationratelayerdescriptor/samplecount
---

# sampleCount

The number of rows and columns in the layer map.

## Declaration

```swift
var sampleCount: MTLSize { get set }
```

## Discussion

Discussion The sampleCount property splits the logical viewport coordinate space into a 2D grid of equal-sized cells. Its depth value is always 0. The default value is the same as maxSampleCount.

## See Also

### Inspecting the layer rate function parameters

- [maxSampleCount](metal/mtlrasterizationratelayerdescriptor/maxsamplecount.md)
- [horizontal](metal/mtlrasterizationratelayerdescriptor/horizontal.md)
- [vertical](metal/mtlrasterizationratelayerdescriptor/vertical.md)
- [MTLRasterizationRateSampleArray](metal/mtlrasterizationratesamplearray.md)
