CAEmitterLayer VERY SLOW

I am developing a particle system using Apple CAEmitterLayer and CAEmitterCell , and everything goes to GREAT on iPhone5 and the simulator. But as soon as I launch it on iPhone4S, the particle system kills FPS. Now I tried to reduce the number of particles on the screen to the point where only one particle is created per second, and the FPS drops just like when 500 particles are created per second. IPhone4S is running iOS 6.1.3, and iPhone5 is running iOS 6.1.4.

Is there a reason CAEmitterLayer slows down the game IT much? Although only one particle is created every second?

+4
source share
2 answers

This helped me in creating the frames:

 emitterLayer.shouldRasterize=YES; 
+1
source

cellLayer.lifetime = 10;

Shortening the life of a CAEmitterCell can help you.

Here is an example for CAEmitterLayer https://github.com/JJMM/CUSSender .

+1
source

Source: https://habr.com/ru/post/1488405/


All Articles