---
title: "encodeRegression(to:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTexture:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsimageguidedfilter/encoderegression(to:sourcetexture:guidancetexture:weightstexture:destinationcoefficientstexture:)"
---

# encodeRegression(to:sourceTexture:guidanceTexture:weightsTexture:destinationCoefficientsTexture:)

## Declaration

```swift
func encodeRegression(to commandBuffer: any MTLCommandBuffer, sourceTexture: any MTLTexture, guidanceTexture: any MTLTexture, weightsTexture: (any MTLTexture)?, destinationCoefficientsTexture: any MTLTexture)
```
