I’m currently making a sandbox game and I want to add a feature to be able to add lights. I want to make it as performance-friendly as possible so I came up with an idea that light updates every 10 sec or so.
Is there any way I can update lighting from code and not every frame?
Any help is appreciated!
This would only be possible if you were doing lighting entirely on the CPU, but if you were doing that it would be much slower regardless because the GPU is built specifically to handle these kinds of things. If you want to be able to have many lights without a huge performance impact, then I would suggest using a deferred renderer - these perform lighting in screen space and therefore are not bound by lighting per-object.