问题
I am trying to apply a CIFilter with SKEffectNode to a SKSpriteNode. Can't get this to work and not sure why. I got this working using a blur but cannot get the mono photo effect. Anyone have any insight? Thanks again.
//Mono Effect (not working)
let filter = CIFilter(name: "CIPhotoEffectMono")
filter?.setDefaults()
effectsNode.filter = filter
self.addChild(effectsNode)
effectsNode.addChild(SKSpriteNode)
//Blur Effect (working)
let filter = CIFilter(name: "CIGaussianBlur")
let blurAmount = 4.0
filter?.setValue(blurAmount, forKey: kCIInputRadiusKey)
effectsNode.filter = filter
effectsNode.blendMode = .alpha
self.addChild(effectsNode)
effectNode.addChild(SKSpriteNode)
来源:https://stackoverflow.com/questions/40413994/applying-a-cifilter-with-skeffectnode-to-a-skspritenode