Implementing Discrete Level of detail for CUnit based on the distance from camera.
Before submitting model to the renderer, it calculates distance from camera. Based on that computed distance, is switches to another actor.
We avoid switching too much by comparing the lods and only reloading the actor when necessary.
- Avoid reloading the whole actor / copying the Model entirely
- Improve animation transition
- Make sure everything works (Need to check floating mostly)
- Implement a way to specify "nothing" at a certain LOD level.
- Maybe using a logarithm for the distance algorithm
Another usage: Hyrule Conquest would like to have that.
Screenshots of Combat Demo Huge (check FPS - not visible: animations are skipped):