 {
     private weak var device:MTLDevice!
     private weak var commandQueue:MTLCommandQueue!
+    private weak var mtlFunction:MTLFunction!
     private weak var textureLoader:MTKTextureLoader!
     private let kTextureMipMapped:Bool = false
     private let kTextureDepth:Int = 1

                    let sequenceItem:MHomeImageSequenceItem = sequence.items[indexMainItem]
                    sequenceItem.createTexture(textureLoader:textureLoader)
                    
                    let destinationTexture:MTLTexture = newCanvasTexure(
                        pixelFormat:mainTexturePixelFormat,
                        width:mainTextureWidth,
                        height:mainTextureHeight)
                }
            }
            
            guard
                
                let textureImage:UIImage = finalTexture.exportImage()
                
            else
            {

    {
        self.device = device
        self.commandQueue = commandQueue
        self.mtlFunction = mtlFunction
        self.textureLoader = textureLoader
        
        if let main:MHomeImageSequenceRaw = main
