Using Metal for Photo Editing

I am trying to implement a image editing application using Core Image that allows the user to apply filters and effects much like Photos does. I can't find any current examples that how how to render an image in MTKView and that allow realtime view of changes to filter parameters. All the examples seems to run on the main thread which results in everything blocking and a rather poor user experience. Apple's Photo's app (macOS) allows you to drag the sliders and see the result in realtime.
I found some articles talking about calling the metal draw(in:) API from background threads and managed to implement something that appears to work. Is there any sample code showing how to use metal to provide realtime filtering of images with Core Image.
Thanks
OK well I solved this after much searching - it's a long story that involves using CAMetalLayer and the correct CIFilter pipeline as well as coordination with view resizing or scrolling but the end results is a realtime view of the effects of changing parameters on CIFilters. Basically a recreation of Photo's and Lightroom functionality with ability to view thousands of thumbnails, smooth scrolling and RAW editing. It can be done ... and it seems I can't include a URL to the result in this post!

Using Metal for Photo Editing
 
 
Q