How to apply a Vignette CIFilter to a live camera feed in iOS?
问题 While trying to apply a simple vignette filter to the raw camera feed of an iPhone6, with the help of Metal and Core Image, I see a lot of lag between the frames being processed and rendered in an MTKView The approach which I have followed is (MetalViewController.swift): Get raw camera output using AVCaptureVideoDataOutputSampleBufferDelegate Convert CMSampleBuffer > CVPixelBuffer > CGImage Create an MTLTexture with this CGImage . Point no. 2 and 3 are inside the method named: