1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00
Commit graph

122 commits

Author SHA1 Message Date
elsid
01166b1f26
Split ESM headers 2024-05-03 01:55:20 +02:00
Evil Eye
1e06d74f82 Fix #7621 2023-11-02 21:53:22 +01:00
elsid
d3dca99a76
Preload terrain in single pass
Otherwise there is lodFlags mismatch because some of the neighbours are removed
during preloading. This makes rendering culling create land chunk nodes again
for the same position, lod because lodFlags are different.
2023-08-29 20:25:21 +02:00
florent.teppe
a9e0489867 fixes stutters => bugs in the way cells were updated. 2023-05-29 11:32:14 +02:00
florent.teppe
0e4d21a40c takes the right terrain bounds. 2023-05-29 11:32:14 +02:00
florent.teppe
7bc4fc6bf9 Fix issues on terrain change
terrain Preloader now preloads the right terrain
2023-05-29 11:32:14 +02:00
florent.teppe
feb60f5ad8 One landsize variable instead of two.
fixes issues in constant values.
2023-05-29 11:32:13 +02:00
florent.teppe
d0211acf9e Fixes bug in terrain loading + collision heightmap works
although terrain rendering is 100% broken right now
2023-05-29 11:32:13 +02:00
florent.teppe
c35c7b3640 ESM4::Land loaded, added to store and to land objects
it does not work yet. Some things are displayed, but it looks all wrong.
2023-05-29 11:31:37 +02:00
florent.teppe
1b718f09c5 adding worldspace info to terrain data structures
Rendering manager can have multiple terrain, one for each queried worldspace
Terrain::World has a worldspace member
storage functions require a worldspace parameter.
2023-05-29 11:31:37 +02:00
florent.teppe
93e7b0d946 Terrain has a mandatory worldspace in constructor
getTerrainHeightAt takes a worldspace.

Doesn't change anything for now => Therrain is created with the default ESM3 worldspace, and is never changed.
2023-05-29 11:31:36 +02:00
glassmancody.info
e778ffee9b po2 scaling for average luminance 2023-02-05 12:30:38 -08:00
elsid
6b8ed4c64f
Use sorted vector for ViewData::contains implementation 2022-10-05 01:10:02 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
ζeh Matt
ddf43ec42f
Move structs into separate headers, cleanup includes, cleanup forwarders 2022-07-18 19:15:03 +03:00
Evil Eye
a95b6e050a Replace new with make_unique in components 2022-05-29 13:24:32 +02:00
Bret Curtis
74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00
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.
2021-11-08 10:27:42 +01:00
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.
2021-10-31 12:59:34 +01:00
Bo Svensson
01605433cb
quadtreeworld.cpp (#3174)
Currently, we disable a paging root node that we only need in exterior cells by setting its node mask to 0 when transitioning into an interior cell. Node masks are not ideal for this usage case because Node::getBound is unaware of masks. With this PR we just detach the unused node from the scene graph. _shadowedScene->getBound() in the MWShadowTechnique should return a much better value in interior cells with these changes.
2021-10-16 21:48:13 +02:00
Bo Svensson
98f8295765
allows to skip ComputeLightSpaceBounds traversal (#3152)
Currently, we always traverse the scene graph an additional time with a ComputeLightSpaceBounds visitor during shadow casting. ComputeLightSpaceBounds is only useful when the shadow casting mask allows us to shrink the bounds of the rendered scene, so we guard its traversal with a check against getCastsShadowTraversalMask. In practice, this guard never works because we build the traversal mask inclusively.

With this PR we limit the getCastsShadowTraversalMask check to relevant masks. This new check allows us to skip a superfluous ComputeLightSpaceBounds traversal with most settings.
2021-10-11 11:27:50 +02:00
Bo Svensson
3f731cd102
attempts to fix spellcasting freezes (#3146)
Firstly, this PR reintroduces commit "Recreate a special case for IntersectionVisitor on QuadTreeWorld" we forgot to reapply while reverting a revert commit. Secondly, in cases we still need to build a view for an intersection visitor, we now use the available `osgUtil::IntersectionVisitor::getReferenceEyePoint` instead of falling back to the origin position that was previously causing long rebuild times.
2021-10-04 22:00:31 +02:00
Bret Curtis
b7c1d9edb0 remove unnecessary includes 2021-09-29 17:13:40 +02:00
Bo Svensson
d8707a763f
fixes build (#3134)
* quadtreeworld.cpp

* renderingmanager.cpp [ci skip]

* quadtreeworld.hpp

* cellborder.hpp

* cellborder.cpp
2021-09-29 17:10:58 +02:00
Bret Curtis
803195a05f add back some explicit includes 2021-09-29 16:29:10 +02:00
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
2021-09-27 21:32:18 +02:00
Bo Svensson
3f68ddd8f4
alternate debug chunks (#3127)
* quadtreeworld.cpp

* chunkmanager.cpp

* chunkmanager.hpp

* quadtreeworld.hpp

* chunkmanager.cpp

* quadtreeworld.cpp

* quadtreeworld.cpp

* quadtreeworld.cpp [ci skip]

* quadtreeworld.hpp

* quadtreeworld.cpp

* quadtreeworld.cpp

* quadtreeworld.cpp

* chunkmanager.cpp

* chunkmanager.cpp
2021-09-27 21:25:39 +02:00
Cédric Mocquillon
4b7d0bba53 Avoid adding redundant osg;;Group in non debug mode 2021-09-11 21:53:04 +02:00
Cédric Mocquillon
98a0819d52 Debug terrain chunks 2021-09-11 21:53:04 +02:00
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]
2021-09-09 23:10:22 +02:00
elsid
605cb8db7c
Make sync terrain preloading sleep free
This reduces average time spent on in. 5 milliseconds as a base precision is
quite a lot considering that for 60 FPS frame time is 1000/16 = ~16.67 ms
when it's a cell loading frame and there is more important work to do rather
than sleeping.
2021-09-07 14:52:42 +02:00
Bret Curtis
436c640da2 the old switch-a-roo because we shoudl only StopTraversal when the node size is larger than 1 and not the other way around 2021-08-09 22:56:04 +02:00
psi29a
e94181b2b2 Merge branch 'constexpr' into 'master'
Sprinkle a couple of constexpr found by VS

See merge request OpenMW/openmw!800

(cherry picked from commit 5e8ea624bc85acebf457592dd10b790124ecf6ef)

5704b2ac Sprinkle a couple of constexpr found by VS
2021-05-04 21:09:20 +00:00
Andrei Kortunov
2d869ca9ff Fix node masks signed/unsigned mismatch 2021-04-20 10:52:51 +04:00
Andrei Kortunov
14cf0ce1dc Implement instanced groundcover 2021-01-26 22:29:41 +04:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
elsid
40ad87bc4d
Replace OpenThreads by std types 2020-06-25 22:16:09 +02:00
bzzt lost a hitlab login
65cd2c77aa static intersections
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
c7fda6d280 activegrid paging = 2xfps
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
b4af2ac672 avoid blocking on pagerebuild
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
17637c6575 pagerebuild on disable
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
ffbed7ee38 loadingscreen
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
b7b31926a8 fix map glitch + cleanup
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
77b92aee9c fix shadowsglitch by bounds overflow
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt lost a hitlab login
cf439581e1 comply by elsid review
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:27 +02:00
bzzt lost a hitlab login
ce505a9bb3 crashfix + optimiziation
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:27 +02:00
bzzt
d684f1a78f terrainbased objectpaging
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:27 +02:00
Capostrophic
1bf2ddac4d Cleanup
Move static variable declaration out of the loop
Remove redundant boolean argument from applyDrawableProperties()
Improve HeightCullCallback class formatting
2020-05-07 18:54:09 +03:00
Bret Curtis
756ec7117b make mGrid (and friends) private again, create accessor method to return bool of mGrid.empty() 2020-04-23 17:40:10 +02:00
Bret Curtis
48713915cb re-use bzzts waterplane overlay for debug; makes it easier to test. To use this, set the env OPENMW_WATER_CULLING_DEBUG=1; You will see blue rectangles corresponding to water outlines. Once there are no more outlines, water is culled. You can further see this by pressing F3 3 times to check the the amount of quads. Before culling it should be around 1600, after culling it should drop to 0. 2020-04-23 11:12:10 +02:00