---
title: "gradientFilter(withSource:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsnnfilternode/gradientfilter(withsource:)"
---

# gradientFilter(withSource:)

## Declaration

```swift
func gradientFilter(withSource gradientImage: MPSNNImageNode) -> MPSNNGradientFilterNode
```
