What I am Trying to DoI am trying to show filters on a camera feed by using a Metal view: MTKView. I am closely following the method of Apple's sample code - Enhancing Live Video by Leveraging TrueDepth Camera Data - linkWhat I Have So FarFollowing code works great (mainly interpreted from above-mentioned sample code) :class MetalObject: NSObject, MTKViewDelegate { private var metalBufferView : MTKView? private var metalDevice = MTLCreateSystemDefaultDevice() private var metalCommandQueue : MTLCommandQueue! private var ciContext : CIContext! private let colorSpace = CGColorSpaceCreateDeviceRGB() private var videoPixelBuffer : CVPixelBuffer? private let syncQueue = DispatchQueue(label: Preview View Sync Queue, qos: .userInitiated, attributes: [], autoreleaseFrequency: .workItem) private var textureWidth : Int = 0 private var textureHeight : Int = 0 private var textureMirroring = false private var sampler : MTLSamplerState! private var renderPipelineState : MTLRenderPipelineState! private var vertexCoordBuffer