Metal MTLTexture reemplaza las áreas semitransparentes con negro cuando los valores alfa no son 1 o 0

Durante el usoImportador de texturas de Apple, o el mío, un círculo blanco de bordes suaves dibujado en software (con un bg transparente) o en Photoshop (guardado como PNG) cuando se renderice tendrá sus colores semitransparentes reemplazados por negro cuando se incorpore a Metal.

A continuación se muestra una captura de pantalla del depurador de metal de Xcode, puede ver la textura antes de enviarla a los sombreadores.

Imagen ubicada aquí (no estoy lo suficientemente alto como para insertar)

En Xcode, Finder, y cuando se coloca en un UIImageView, la textura de origen no tiene el anillo. Pero en algún lugar a lo largo del proceso UIImage -> CGContex -> MTLTexture (estoy pensando específicamente en la parte MTLTexture) las secciones transparentes se oscurecen.

He estado golpeando mi cabeza contra la pared cambiando todo lo que pude durante los últimos días, pero no puedo entenderlo.

Para ser transparente (ha), aquí está mi código de importación personal

import UIKit
import CoreGraphics

class MetalTexture {

    class func imageToTexture(imageNamed: String, device: MTLDevice) -> MTLTexture {
        let bytesPerPixel = 4
        let bitsPerComponent = 8

        var image = UIImage(named: imageNamed)!

        let width = Int(image.size.width)
        let height = Int(image.size.height)
        let bounds = CGRectMake(0, 0, CGFloat(width), CGFloat(height))

        var rowBytes = width * bytesPerPixel
        var colorSpace = CGColorSpaceCreateDeviceRGB()

        let context = CGBitmapContextCreate(nil, width, height, bitsPerComponent, rowBytes, colorSpace, CGBitmapInfo(CGImageAlphaInfo.PremultipliedLast.rawValue))

        CGContextClearRect(context, bounds)
        CGContextTranslateCTM(context, CGFloat(width), CGFloat(height))
        CGContextScaleCTM(context, -1.0, -1.0)
        CGContextDrawImage(context, bounds, image.CGImage)

        var texDescriptor = MTLTextureDescriptor.texture2DDescriptorWithPixelFormat(.RGBA8Unorm, width: width, height: height, mipmapped: false)

        var texture = device.newTextureWithDescriptor(texDescriptor)
        texture.label = imageNamed

        var pixelsData = CGBitmapContextGetData(context)

        var region = MTLRegionMake2D(0, 0, width, height)
        texture.replaceRegion(region, mipmapLevel: 0, withBytes: pixelsData, bytesPerRow: rowBytes)

        return texture
    }
}

Pero no creo que ese sea el problema (ya que es una copia de Apple en Swift, y he usado la suya sin diferencias).

Cualquier derivación sería de gran ayuda.

Respuestas a la pregunta(2)

Su respuesta a la pregunta