The latest version was bugged as it removed all standard objects, but removing only objects marked by track-makers removed almost nothing of note, and bugs would sometimes remove normal objects. Fix#5052. Fix#5066. This makes #5063 moot.
- Increase the Auto-LoD distance on tracks with a low scene complexity (fix#5065)
- Increase the Auto-LoD distance when the old formula gives a too low base distance (small objects). This helps with some of the worst popping issues for comparatively little performance cost.
- Make the LoD distance auto-compute code clearer by moving the settings-related multiplier after the squaring step
- Also fix a couple of unrelated warnings about comparison between signed and unsigned integers
- Ensure that optional geometry objects are properly removed. This provides a massive performance boost, at the cost of visuals. Benchmark on graphics 2 with lowest geometry level: bugged has 202 steady FPS, 230 mostly stable FPS, fixed has 427 steady FPS, 495 mostly stable FPS.
- Restrict the removal of objects based on geometry detail to the lowest geometry level. This ignore the different levels of geometry removal that track authors can set for objects, and which was mostly unused: all objects marked for removal at any level are either all removed or all kept.
Add 3 new setting values, increasing the distance at which a lower level of detail is used by factors of 1.6, 2.0 and 3.0 (default is 1.25). This allows players for which getting enough FPS is not an issue to reduce pop-in and improve the looks of tracks.
In local testing with a strong CPU and a weak GPU, the performance impact of increasing the view distances is small and well worth it, but this may vary from system to system. More testing is needed on different systems, but this suggests room to increase minimum, default and maximum values in future releases.
This patch also slightly changes the auto-computation of LoD distance, making the transition around a distance of 250 smoother.
It used to work in 1.2 because the top of the invisible wall was
not covered, which will affect height map calculation. Now we
ignore physics only objects when doing the height map calculation.
* Enable LoD autocompute
* bring back the autocompute lod function
* Add the area as main function to compute the lod level
* Bring back the area based auto lod computation
Co-authored-by: samuncle <samuncle06@gmail.com>