I am trying to apply CIGaussianBlur effect on Game Pause screen. Here is my code:
effectsNode = SKEffectNode();
let filter = CIFilter(name: "CIGaussianBlur");
let blurAmount = 10.0;
filter.setValue(blurAmount, forKey: kCIInputRadiusKey);
effectsNode.filter = filter;
effectsNode.blendMode = .Alpha;
This code is working perfectly but it takes too much processing power and reduces the FPS by a great deal! I just want a static blurred image of the background when the game is paused.
Is there a workaround to this problem?
Are you applying the effect on each frame? You should apply it only once and then save the result, and show that result during pause. You can see an example of this in this post
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