How can i improve Light2D performance on Android devices?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Pikmaan

Hi guys, i’m developing a simple game in which each scene has a CanvasModulate node to blend everything in a “darky” atmosphere and then i have some Light2D nodes. It works pretty well on my computer but when i export it on an android device, fps drop from 60 to 40 (or even worse) each time the camera is over the lights. I think it’s lights problem because if i disable them everything works fine.
They are mostly scenes with 4 or 5 lights without occluders or shadows.
Is there a way to improve Light2D performances? What are the best practices to make them work properly? Are there rendering/quality settings that impact on Light2D performances?

:bust_in_silhouette: Reply From: Pikmaan

I removed all Light2D nodes and made lights stacking textures.

Could you please explain shortly what you did to achieve this? I am also struggling with Light2D performance on Android.

I have a similar setup with CanvasModulate for a “night” atmosphere with several Light2Ds where the user can place his characters on the play field. With increasing amount of Light2Ds the performance gets worse.

Tried it with a Sprite node, attaching the same texture for the Light2Ds while applying CanvasItemMaterial to it with several blend modes, but I could not achieve the same visual result like Light2D.

YalcinA | 2019-07-26 14:07