So I have one directional light and then the character has a point light that affects certain objects, to sort of illuminate the things around the player. On device, there’s some flickering – the point light seems to shut on/off randomly. Any way I can stop this? It’s a nice effect and my framerate can afford it, but the occasional flickering makes it look sloppy.
edit: seems to happen more when the point light is affecting more objects
the mobile opted shaders are mostly hardcoded to a single light for performance reasons (and cause you don’t want more than 1 pixel light anyway normally due to the fillrate impact)
so if you have more than one light affecting them you get into a pretty troublesome situation and thats the point in time when the light sources are switched that are used due to your position and view direction.
the only way to overcome this is:
manually control the lights
use layers and ensure that not more than 1 pixel light is affecting an object at a time