Lighten sprites cause poor performance

Hello,

I’m creating 2d game, where in one of the level only part of screen is lighted (like by flashlight) and rest of screen is black.

I have problem with sprites performance when using “Sprite-Diffuse” shader and point lights. Relatively small ammount of sprites (10-20) with 2-3 lights give very poor performance (about 5fps on tegra3 device).

Anyone have idea how this could be achieved with good performance on mobile devices?
We’re thinking about using dynamically generated culling mask texture on camera or use faster sprite shader.

Thanks in advance.

Hi - there could be a few confounded issues here affecting performance; the workflow setup (lights, size of sprites on screen, overlap etc) the tegra 3 chip itself and the shader. In order to best determine some optimisations the best way forward would be to submit an example as a bug through the unity bug reporter:

Unity > Help > Report a bug

That way our 2D and graphics teams have access to the issue and can help with diagnosing any performance optimisations. Please email support@unity3d.com when you have received your bug number. If you do not wish to submit a whole project please follow these instructions:

Unity Support