Silence-GitHub / BBMetalImage

A high performance Swift library for GPU-accelerated image/video processing based on Metal.
MIT License
989 stars 126 forks source link

BBMetalView to render image #44

Closed knightbenax closed 4 years ago

knightbenax commented 4 years ago

Is it possible to use BBMetalView to render images from the image processing pipeline? The docs say nothing about that.

Silence-GitHub commented 4 years ago

BBMetalView can receive and display image texture, but can not output texture. If you need to process texture displayed on the metal view, you can set up filter chain like this

let imageSource = ...
let filter1 = ...
let metalView = ...
let filter2 = ...
imageSource.add(consumer: filter1)
    .add(consumer: metalView)
filter1.add(consumer: filter2)
    .add(consumer: ...)