Hello everyone! I have a problem that I could use some help with. I have a game where there are a very large amount of interactable light sources the player can light and putout, each with its own point light. The problem as you can imagine is having hundreds of realtime lights is going to slow the game down very quickly.
I thought about using lightmaps instead of realtime lights, but all the lights have to be able to fade on and fade off when the player interacts with them, and correct me if I am wrong but lightmaps are intended for completely static lights, right? so fading individual lights in and out wouldn’t work.
I also thought about grouping close lights together and having them share the same light, but most of the lights are too far apart for this to look any good.
Is there some way I can have dozens and dozens of lights and still have it perform well? or some way I can have the illusion of light coming from a source but without actually using a light? Any help would be greatly appreciated!
If you have the option of working using Deferred Rendering, then (basically) any number of lights will have a (basically) fixed cost to process and render.
By extension, if you’re using Forward Rendering, then there’s a hard limit of (approximately) 8 simultaneous lights anyway. Any others that Unity decides not to give priority to at any given camera position won’t emit light until they’re “deemed important” enough to be given priority (through a combination of culling, distance, angle, etc.).
On one hand, having a huge number of lights won’t help performance compared to having fewer. On the other hand, there’s also something of an upper limit to how greatly you can impact performance with them.