Here is a repository with code and instructions to start and reproduce FPS loss. It should take about 3-5 minutes to reproduce: phaser3-mask-fps-drop
I cut off everything other and simply left a UI element that causes heavy FPS loss when masks are enabled and added sprite emitter on background for simulate some load that can be visually measured. My game is targeted on mobile devices and using masks makes it very laggy.
The question is: why 4 simple sprite masks cause so noticeable FPS drop? Is there any solution or workaround? Thanks in advance
Performance on Iphone6+ in Chrome 78.0.3904.84 (latest, nov 2019) without masks
Performance on Iphone6+ in Chrome 78.0.3904.84 (latest, nov 2019) with masks
Hello, yes I am, what is wrong with that? 10 000 balls are working perfectly fine across different devices and browsers with good FPS and are added to scene just to show the FPS difference. When I add 4 simple sprite masks on the screen everything starts to lag down. The thing I want to understand is why simple sprite masks impact performance of game so heavily. Let’s take this spawning balls as game background load.
You can change 10000 balls to 5 or 10 and the FPS drop will still be huge and noticeable when using masks