Commit Graph

27 Commits (master)

Author SHA1 Message Date
elsid 491a59b035
Remove unused getActiveGrid function 8 months ago
elsid 6b8ed4c64f
Use sorted vector for ViewData::contains implementation 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
ζeh Matt ddf43ec42f
Move structs into separate headers, cleanup includes, cleanup forwarders 2 years ago
Bo Svensson 5f1bf89369
improves groundcover view distance (#3219)
This PR aims to solve all issues with `Groundcover` view distance handling in a satisfying way while preserving other optimisations that benefit other features. The main idea here is not to rely on `ViewData` updates for distance culling calculations because we can not accurately determine distance against lazily updated views. Instead, we perform an accurate measurement in a cull callback we can run every frame in `Groundcover` itself. While we do have to add some code to handle this feature, it is quite loosely coupled code that could be useful elsewhere in the future. These changes should address a performance regression @akortunov experienced.
3 years ago
Bo Svensson d88d006984
fixes getViewDistance (#3207)
I have been informed by @akortunov that my addition of `Groundcover::getViewDistance` is not working in some cases. Investigations revealed that some `ViewData` code interacting with my additions had been quite thoroughly optimised in a way that was not sufficiently documented and interfered with the new feature. With this PR we repair `getViewDistance` while preserving such optimisations and add a necessary comment to avoid issues in the future. In addition, we now rebuild views when the global `mViewDistance` changes.
3 years ago
Bo Svensson 01cc61087b
improves paging preloader (#3126)
* Return check for distance when we try to reuse data

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* cellpreloader.cpp

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* quadtreeworld.cpp

* chunkmanager.cpp

* chunkmanager.cpp

* cellpreloader.cpp

* jvoisin

* whitespace

* whitespace
3 years ago
Bo Svensson 9d661359a1
Groundcover consolidation (#3096)
* chunkmanager.hpp viewdistance

* chunkmanager.cpp viewdistance

* chunkmanager.hpp viewdistance

* quadtreeworld.cpp viewdistance

* quadtreeworld.cpp consolidate

* quadtreeworld.hpp consolidate

* renderingmanager.cpp groundcover consolidate

* renderingmanager.hpp groundcover consolidate

* renderingmanager.cpp updater move

* renderingmanager.hpp updater move

* groundcover.hpp activegrid consolidation

* groundcover.cpp activegrid consolidation

* settings-default.cfg dead settings remove

* viewdata.cpp revert

* wrong file paste mistake

* wrong file paste mistake

* wrong file paste mistake

* renderingmanager.cpp updatecallback fix

* renderingmanager.cpp namespace fix

* groundcover.hpp redefinition fix

* groundcover.cpp redefinition fix

* renderingmanager.cpp crash fix

* renderingmanager.cpp euclidean groundcover distance

* viewdata.hpp getreusedistance

* quadtreeworld.cpp reusedistance

* groundcover.rst [ci skip]
3 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
bzzt lost a hitlab login 4238fbccdf view fix
Signed-off-by: Bret Curtis <psi29a@gmail.com>
5 years ago
bzzt lost a hitlab login b4af2ac672 avoid blocking on pagerebuild
Signed-off-by: Bret Curtis <psi29a@gmail.com>
5 years ago
bzzt lost a hitlab login 17637c6575 pagerebuild on disable
Signed-off-by: Bret Curtis <psi29a@gmail.com>
5 years ago
bzzt d684f1a78f terrainbased objectpaging
Signed-off-by: Bret Curtis <psi29a@gmail.com>
5 years ago
bzzt a730365ea1 Creanup Distant Terrain code
- Cull terrain in the stock osg::CullVisitor
- Do not compile composite maps for shadow camera
- Do not abuse userdata for composite maps
6 years ago
elsid 4500f01efd
Remove unused field 6 years ago
bzzt 391f6faffb Remove unused defaultViewer / defaultViewPoint 6 years ago
Andrei Kortunov 489e5c6cce Store preloaded terrain view in the main thread 6 years ago
bzzt 63ab7345be Reuse traversal result for different traversal with same view point
Rename eyePoint to viewPoint to match OSG conventions (eyePoint is the camera position, viewPoint is for LOD handling)
6 years ago
bzzt c8d2107b80 Do not store Viewer reference in the ViewData 6 years ago
scrawl 3e03a0d7bd Terrain: remove ref argument that is now always true 8 years ago
scrawl ac78d01b2b Terrain: use the main camera's viewpoint for intersection tests
Fixes lag spikes caused by intersection tests loading/unloading terrain pages.
8 years ago
scrawl 3c29e2dbeb Refactor ownership of terrain views 8 years ago
scrawl 4baa795152 Add preloading implementation to QuadTreeWorld 8 years ago
scrawl 9db71e3f62 Recompute the LOD stitching when the view changes 8 years ago
scrawl bb991850da Add LOD stitches 8 years ago
scrawl 8c151364df Add special handling for CullVisitor to QuadTreeWorld.
- Cull only against bounding box, not bounding sphere, as this appears to perform better.
- Also traverse into non visible nodes to compute their LOD, this is to avoid nodes having to be loaded in when the player turns the view around, and will avoid unnecessary refs/unrefs of rendering data in the View. This should probably be turned off at some point for static cameras, such as the local maps.
8 years ago
scrawl e36bdb490e Add view data structure for efficient collection of LOD nodes to use for a given camera/intersection 8 years ago