this approach allows for practically infinite amount of lights. i have separate subviewport to which i draw in order to generate what one might call a "depth buffer". all light data (position, range, color) is passed to deferred shader, where light is calculated in a ray-based manner.