---
title: secondaryEdgeMode
framework: metalperformanceshaders
role: symbol
role_heading: Instance Property
path: metalperformanceshaders/mpsbinaryimagekernel/secondaryedgemode
---

# secondaryEdgeMode

The edge mode to use when texture reads stray off the edge of the secondary source image.

## Declaration

```swift
var secondaryEdgeMode: MPSImageEdgeMode { get set }
```

## Discussion

Discussion Most kernel objects can read off the edge of a source image. This can happen because of a negative offset property, because the offset + clipRect.size is larger than the source image, or because the filter uses neighboring pixels in its calculations (e.g. convolution filters). The default value is usually MPSImageEdgeMode.zero, but some kernels default to the MPSImageEdgeMode.clamp value instead if an edge mode of zero is either unsupported or undefined.

## See Also

### Properties

- [primaryOffset](metalperformanceshaders/mpsbinaryimagekernel/primaryoffset.md)
- [secondaryOffset](metalperformanceshaders/mpsbinaryimagekernel/secondaryoffset.md)
- [primaryEdgeMode](metalperformanceshaders/mpsbinaryimagekernel/primaryedgemode.md)
- [clipRect](metalperformanceshaders/mpsbinaryimagekernel/cliprect.md)
