---
title: "encodeRegression(commandBuffer:source:guidance:weights:destinationCoefficientsA:destinationCoefficientsB:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsimageguidedfilter/encoderegression(commandbuffer:source:guidance:weights:destinationcoefficientsa:destinationcoefficientsb:)"
---

# encodeRegression(commandBuffer:source:guidance:weights:destinationCoefficientsA:destinationCoefficientsB:)

## Declaration

```swift
func encodeRegression(commandBuffer: any MTLCommandBuffer, source sourceTexture: any MTLTexture, guidance guidanceTexture: any MTLTexture, weights weightsTexture: (any MTLTexture)?, destinationCoefficientsA destinationCoefficientsTextureA: any MTLTexture, destinationCoefficientsB destinationCoefficientsTextureB: any MTLTexture)
```
