I have an application using SpriteKit. I made a simple transition using a SKEffectNode which has a CIFilter, which I apply a setValue to change the filter's parameters on every update (using SpriteKit's built in update loop method) according to some function.
This worked perfectly fine on iOS 9 and before I upgraded to Swift 3, although I don't think the Swift version has anything to do with it.
Now, I get a frame with the first parameter value, which persists until the final parameter value. What has changed from iOS 9 to iOS 10 here?
I noticed that I was enabling shouldEnableEffects at the beginning of my timer, and disabling it at the end, and this corresponded to the filter values I was observing on screen.
Setting shouldEnableEffects to true after every call to setValue fixed the problem, so that I see the filter being changed on every update. Not sure if this is a hack, or if something changed in SpriteKit or iOS 10 for performance or optimization reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With