Category : metal-performance-shaders

I want to make this custom CIFilter. var dummyColors = [ CIVector(x: 0.9, y: 0.3, z: 0.4), CIVector(x: 0.2, y: 0.5, z: 0.9), CIVector(x: 0.5, y: 0.9, z: 0.3) ] var normal = dummyColors.withUnsafeMutableBufferPointer { (buffer) -> UnsafeMutablePointer<CIVector> in var p = buffer.baseAddress print(p) return p! } //this is parameter and how to pass bvalue ..

Read more

I am following this online tutorial on making custom image filter with metal. I got an error while setting pipeline state. I think the grayscaleShader is still empty even after I did .makeFunction with the matching name in the upper lines. self.device prints out "Apple A13 GPU" self.defaultLib prints out nil init(){ self.device = MTLCreateSystemDefaultDevice()! ..

Read more