Light Optimizations
Posted: Thu Dec 17, 2020 7:27 pm
I've noticed a lot of lights can often end up enabled at once in daggerfall. This is fine for DFU vanilla, but once mods are piled on, this can cause issues.
One neat trick that is extremely optimal is to fade lights once they are a certain distance away! However, I think such an implementation needs to be done carefully - other mods/systems (such as flickering lights) want to affect the intensity of lights. So: how should this be done?
In my own open world project, I implemented such a feature: https://github.com/joshcamas/lightinten ... tensity.cs
This allows other components to register a light intensity, light enabled, or shadow distance function. The light then goes through the registered functions and runs them, passing the modified intensity value through.
Is this something that interests you guys? It would require an update from a few mods (such as interior lights), and we'd want to add a setting to allow tweaking of light distance. But I think it would be great for optimization, since lights can get quite expensive
One neat trick that is extremely optimal is to fade lights once they are a certain distance away! However, I think such an implementation needs to be done carefully - other mods/systems (such as flickering lights) want to affect the intensity of lights. So: how should this be done?
In my own open world project, I implemented such a feature: https://github.com/joshcamas/lightinten ... tensity.cs
This allows other components to register a light intensity, light enabled, or shadow distance function. The light then goes through the registered functions and runs them, passing the modified intensity value through.
Is this something that interests you guys? It would require an update from a few mods (such as interior lights), and we'd want to add a setting to allow tweaking of light distance. But I think it would be great for optimization, since lights can get quite expensive