---
title: "encode(to:sourceTexture:minmaxTexture:histogram:histogramOffset:)"
framework: metalperformanceshaders
role: symbol
role_heading: Instance Method
path: "metalperformanceshaders/mpsimagenormalizedhistogram/encode(to:sourcetexture:minmaxtexture:histogram:histogramoffset:)"
---

# encode(to:sourceTexture:minmaxTexture:histogram:histogramOffset:)

## Declaration

```swift
func encode(to commandBuffer: any MTLCommandBuffer, sourceTexture source: any MTLTexture, minmaxTexture: any MTLTexture, histogram: any MTLBuffer, histogramOffset: Int)
```
