Miloslav Číž
c3d7ee5a9e
Resolve merge conflicts
2018-06-13 08:22:37 +02:00
wareya
94f695cffc
Fix #4452 and remove dead code
2018-06-12 21:04:27 -04:00
Miloslav Číž
db8aaa74d6
Start cell border debug drawing
2018-06-13 01:48:31 +02:00
wareya
6277f5511c
fix #3876 and #3993
2018-06-08 17:52:46 -04:00
AnyOldName3
759e6fb804
Merge remote-tracking branch 'refs/remotes/upstream/master'
2018-05-27 15:41:42 +01:00
Marc Zinnschlag
810e4416f6
Merged pull request #1691
2018-05-23 16:56:36 +02:00
Andrei Kortunov
888c2d9a33
Render default land texture for Wilderness cells with distant terrain
2018-05-22 12:40:01 +04:00
Andrei Kortunov
6cc7405194
Remove unnecessary command from QuadTreeWorld destructor (bug #4408 )
2018-04-30 18:29:26 +04:00
AnyOldName3
fc41902798
Replace a dynamic cast with string comarison
2018-03-01 14:37:11 +00:00
AnyOldName3
d1a2955fa1
Merge upstream
2018-02-27 14:29:14 +00:00
AnyOldName3
e233dae1cd
Hook up the new shadow technique
2018-02-26 22:27:09 +00:00
AnyOldName3
02d0ee3485
Rename old shadow class to shadow manager
2018-02-26 14:29:31 +00:00
AnyOldName3
9ec59783ba
Add basic support for distant terrain CLSB
...
(cherry picked from commit 0f9dc3e65b72e6fff762f7a0933bae6f861e5fd4)
2018-02-23 23:37:04 +00:00
scrawl
9b8c56761b
Fix timing error
2018-02-13 18:25:28 +00:00
Alexander "Ananace" Olofsson
145b47a550
Fix Windows builds
...
`std::min`/`std::max` are part of algorithm, which is not implicitly included in Windows builds
2018-02-13 17:47:38 +01:00
scrawl
123f7b83d5
Make the CompositeMapRenderer use available time and add related setting
2018-02-13 00:40:41 +00:00
AnyOldName3
112ade2a3f
Ensure TerrainDrawables affect the computed near/far planes.
2018-01-22 15:52:37 +00:00
AnyOldName3
1a30a917af
Merge upstream/master
2017-11-08 01:31:38 +00:00
scrawl
7b4add2ae4
Fall back to non-shader material if creating the shader fails
...
Also fixes an uncaught exception that will break the whole game.
2017-11-08 00:24:03 +00:00
scrawl
ceaf0ee409
Enable shadow casting for terrain
...
Add a check to TerrainDrawable to make sure shadows are only drawn once, not once per blending pass
2017-10-31 21:21:05 +01:00
Marc Zinnschlag
dd17f70068
Merge remote-tracking branch 'aesylwinn/landrecords'
2017-10-03 13:32:02 +02:00
Chris Robinson
021627bdf8
Mark some functions with override
...
Fixes some Clang warnings about overriding a virtual function without the
override keyword.
2017-09-18 01:51:11 -07:00
Kyle Cooley
2abf7f1752
Remove unnecessary cache dump
2017-09-15 12:19:12 -04:00
Kyle Cooley
2eacc2f093
Changes to land creation, add ability to specifically clear terrain cache
2017-09-08 14:37:03 -04:00
scrawl
4fba157d3b
Implement releaseGLObjects for cached resources
2017-08-26 19:29:12 +00:00
Kyle Cooley
979b0d7211
Code cleanup and more cache clearing
2017-08-21 18:58:38 -04:00
Kyle Cooley
3b9326d238
Clear terrain cache and reload terrain
2017-08-20 22:34:41 -04:00
scrawl
3e03a0d7bd
Terrain: remove ref argument that is now always true
2017-07-19 16:24:35 +02:00
scrawl
ac78d01b2b
Terrain: use the main camera's viewpoint for intersection tests
...
Fixes lag spikes caused by intersection tests loading/unloading terrain pages.
2017-07-19 13:11:44 +02:00
Ewan Higgs
38a2de3c51
convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis
2017-06-09 16:49:25 +02:00
scrawl
c992cb6e82
Fix texture not being applied on rendering the composite map ( Fixes #3791 )
2017-03-19 19:15:22 +01:00
scrawl
a070551af3
Attempt to fix naming conflict on windows
2017-03-15 17:51:00 +01:00
scrawl
088d5604bf
Use a shader if required to display the composite map
...
Fixes composited terrain not respecting the 'clamp lighting' setting.
2017-03-14 19:27:56 +01:00
scrawl
7f5beb3172
Remove unused includes
2017-03-14 19:27:56 +01:00
scrawl
5044816770
Remove unused code
2017-03-14 19:27:56 +01:00
scrawl
b66c2abfe3
Build the bounding sphere in the loading thread (only relevant for TerrainGrid)
2017-03-14 19:27:56 +01:00
scrawl
9e9c028f1d
Skip light collection for far away terrain
2017-03-14 19:27:56 +01:00
scrawl
0782839a42
Avoid redundant culling tests on the transform/drawable
2017-03-14 19:27:56 +01:00
scrawl
fb8ac06524
Reduce the minSize of quad tree nodes for better performance
2017-03-14 19:27:56 +01:00
scrawl
a041546b54
Use the quad tree's minSize in the LodCallback
2017-03-14 19:27:56 +01:00
scrawl
e4e8821902
Refactor update of lodFlags
2017-03-14 19:27:56 +01:00
scrawl
2aa09639a9
Re-enable terrain intersections
2017-03-14 19:27:56 +01:00
scrawl
db00d47ca2
Hold a ref to the intersection visitor's view if possible
2017-03-14 19:27:56 +01:00
scrawl
11bee6ee35
Avoid compiling composite maps that are no longer referenced
2017-03-14 19:27:56 +01:00
scrawl
9eed7fa6f5
Fix composite map when force shaders is enabled
2017-03-14 19:27:56 +01:00
scrawl
d055dc25bf
Add custom traversal for local map camera to avoid loading terrain nodes that are exactly outside the border to another cell
2017-03-14 19:27:56 +01:00
scrawl
7d50b6c2e2
Add QuadTreeWorld::cacheCell to preload cells at max LOD for local maps
2017-03-14 19:27:56 +01:00
scrawl
6ccb6009ee
Use the View-based preloading for TerrainGrid as well
2017-03-14 19:27:56 +01:00
scrawl
3c29e2dbeb
Refactor ownership of terrain views
2017-03-14 19:27:56 +01:00
scrawl
28fd492711
Don't use terrain LOD for the map camera
2017-03-14 19:27:56 +01:00
scrawl
e7a0878c10
Add CompositeMapRenderer info to the stats panel
2017-03-14 19:27:56 +01:00
scrawl
c921620ef3
Compile the drawables of a composite map one by one to avoid frame drops for larger maps
2017-03-14 19:27:56 +01:00
scrawl
47ca8aeee5
Use the time elapsed instead of # compiled as limit
2017-03-14 19:27:56 +01:00
scrawl
8a6d909b22
Fix composite map being compiled twice
2017-03-14 19:27:56 +01:00
scrawl
683e625c6c
Rewrite CompositeMapRenderer to be based on Drawable and share the FBO
2017-03-14 19:27:56 +01:00
scrawl
4baa795152
Add preloading implementation to QuadTreeWorld
2017-03-14 19:27:56 +01:00
scrawl
9db71e3f62
Recompute the LOD stitching when the view changes
2017-03-14 19:27:56 +01:00
scrawl
ef704db877
Fix reset of changed flag
2017-03-14 19:27:56 +01:00
scrawl
1c15686353
Remove non required use of WorkQueue
2017-03-14 19:27:56 +01:00
scrawl
433900fca5
Fix waiting on initial quad tree build
2017-03-14 19:27:56 +01:00
scrawl
4dbd224249
Hide the terrain in non-exterior cells
2017-03-14 19:27:56 +01:00
scrawl
2580de11a4
Refactor ownership of ViewDataMap
2017-03-14 19:27:56 +01:00
scrawl
5a3c645c89
Enable lazy compiling of composite maps
2017-03-14 19:27:56 +01:00
scrawl
99e18f0d68
Clear the ViewData on exit
2017-03-14 19:27:56 +01:00
scrawl
bb991850da
Add LOD stitches
2017-03-14 19:27:56 +01:00
scrawl
6bd286d924
Fix unnecessary resizing in ViewData
2017-03-14 19:27:56 +01:00
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.
2017-03-14 19:27:56 +01:00
scrawl
f19a88be9d
Reject QuadTreeNodes with invalid bounds
2017-03-14 19:27:56 +01:00
scrawl
7d004bf757
Preliminary rendering of QuadTreeWorld
2017-03-14 19:27:55 +01:00
scrawl
e36bdb490e
Add view data structure for efficient collection of LOD nodes to use for a given camera/intersection
2017-03-14 19:27:55 +01:00
scrawl
0efc54c749
Subdivide the composite maps
2017-03-14 19:27:55 +01:00
scrawl
819860081f
Remove custom bounding box
2017-03-14 19:27:55 +01:00
scrawl
ce8c4ad4f5
Add quad tree implementation (no rendering yet)
2017-03-14 19:27:55 +01:00
scrawl
14225a42c6
Remove unused pointer to IncrementalCompileOperation
2017-03-14 19:27:55 +01:00
scrawl
c487df0abb
Move updateTextureFiltering and material into the base class
2017-03-14 19:27:55 +01:00
scrawl
5eff286c71
Use separate node mask and parent for CompositeMapRenderer to allow the loading screen to pre compile composite maps.
2017-03-14 19:27:55 +01:00
scrawl
7e4450da55
Change the renderOrder of composite maps to ensure they are updated before water reflections or other cameras that may be using it.
2017-03-14 19:27:55 +01:00
scrawl
b1d4bb5708
Add CompositeMapRenderer
...
Temporarily render all terrain using composite maps for testing purposes
2017-03-14 19:27:55 +01:00
scrawl
e323b2fa7b
Use the SceneManager's ShaderManager
2017-03-14 19:27:55 +01:00
scrawl
051c17a184
Make reportStats const
2017-03-14 19:27:55 +01:00
scrawl
16b5cadd9e
Fix order of operations w.r.t clearing cache
2017-03-14 19:27:55 +01:00
scrawl
2c68ed4fb4
Remove no longer required use of UnrefQueue as the new resource manager will naturally clear the cache from the worker thread
2017-03-14 19:27:55 +01:00
scrawl
35d53acc65
Factor out terrain chunk loading/caching into a new resource manager
2017-03-14 19:27:55 +01:00
scrawl
274690f790
Refactor BufferCache to allow caching buffers of different sizes
2017-03-14 19:27:55 +01:00
scrawl
804f873649
terrain: factor out texture caching into a separate class
2017-03-14 19:27:55 +01:00
scrawl
eef63a880a
terrain: use a custom drawable for multi-pass render instead of osgFX::Effect
...
osgFX::Effect is awkward to use because of the lazy-definition of passes, no support for compileGLObjects, useless 'Technique' abstraction and having to define silly methods like 'effectAuthor()'
Handling the multi-pass rendering inside the Drawable also avoids redundant culling tests against the same bounding box for each pass.
2017-03-14 19:27:55 +01:00
scrawl
62cc091414
Fix incorrect setting of TexMat in terrain material
2017-03-02 18:07:01 +01:00
scrawl
8f79fa3d72
Add resource statistics panel opened with F4
2017-02-22 14:28:45 +01:00
scrawl
c5f8ff6e0e
Add names to several nodes for debugging purposes
2017-02-02 21:49:52 +01:00
Allofich
0f20312012
Fix MSVC warnings
2017-01-28 04:37:47 +09:00
scrawl
4322e76cb6
Fix shadowing warnings
2016-08-29 12:38:24 +02:00
scrawl
157c11398d
Add terrain parallax mapping
2016-03-22 21:46:15 +01:00
scrawl
3f08cbff71
Share the state attributes for terrain techniques
...
Reduces the total amount of GL calls / frame by about 14% - 50% depending on the scene.
2016-03-11 01:08:53 +01:00
scrawl
f898bf493f
Don't use Geodes
2016-03-10 13:17:01 +01:00
scrawl
8f81df2bd3
Cleanup
2016-02-20 20:34:56 +01:00
scrawl
0db7163363
Add specular mapping for terrain
2016-02-20 19:55:08 +01:00
scrawl
6a0ac824bd
Fix terrain error in OpenCS
2016-02-19 15:00:58 +01:00
scrawl
7071d286e8
Fix inverted check for 16-bit indices
2016-02-19 14:59:47 +01:00
scrawl
ca0e1fe0e0
Set the osg::Material on the terrain root node
2016-02-19 01:45:28 +01:00
scrawl
6000e48bba
Add terrain shaders and normal map support
...
Textures with _n filename suffix are automatically recognized as terrain normal maps.
2016-02-19 01:37:30 +01:00
scrawl
e05d975020
Change the way that texture filtering settings are applied at runtime
2016-02-18 19:37:55 +01:00
scrawl
5824619a95
Clean up includes
2016-02-12 19:28:10 +01:00
scrawl
8b596dfcbe
Remove support for OSG 3.2
...
Since commit e8662bea31
, we're using OSG functionality that contains an unfixed crash bug in version 3.2. The bug is fixed in version 3.4 (OSG commit 6351e5020371b0b72b300088a5c6772f58379b84)
2016-02-12 14:46:45 +01:00
scrawl
5e876b1379
Add missing include
2016-02-10 15:34:06 +01:00
scrawl
98c5e072f2
Swap the terrain cache update order to make more sense
2016-02-09 21:17:10 +01:00
scrawl
0865cea211
Preload terrain
2016-02-09 21:16:11 +01:00
scrawl
8aba74e6ee
Remove GridElement
2016-02-09 20:23:53 +01:00
scrawl
d11c2864df
Introduce UnrefQueue to handle the deleting of no longer needed objects in the background thread
2016-02-09 15:45:35 +01:00
scrawl
c3ad4dad75
Fix applying of filter settings on terrain textures
2016-02-07 05:53:56 -08:00
scrawl
9e5225bb6f
Do not unref a Texture's image data after applying it
2016-02-05 23:21:54 +01:00
scrawl
9e53e12c70
More renaming of TextureManager -> ImageManager
2016-02-05 23:10:27 +01:00
scrawl
f99f403dda
Rename TextureManager to ImageManager
2016-02-05 23:03:53 +01:00
scrawl
6ef848b7c5
Remove TextureManager::getTexture2D
...
Instead use getImage and let the caller create the Texture. Sharing of textures is then handled in post by the SharedStateManager.
This is closer to what the OSG serializer does.
Streamlines the TextureManager and will make it easier to multithread.
2016-02-05 23:01:11 +01:00
scrawl
fbd4ad9b0c
Flip terrain textures
2016-02-05 22:46:15 +01:00
scrawl
31988ca4cc
Add a dont_override_filter description for textures that should be left alone
2016-02-05 21:07:08 +01:00
scrawl
b06730ac61
Fix terrain textureCompileDummy
2016-02-05 21:02:16 +01:00
scrawl
62169a7039
Use a single-precision PositionAttitudeTransform in speed critical places
2015-11-22 19:54:26 +01:00
scrawl
52901ec10c
Do not create terrain geodes when built with OSG 3.4
2015-11-16 15:11:20 +01:00
scrawl
72252d4f32
Terrain: restore IncrementalCompileOperation
2015-11-06 20:22:07 +01:00
scrawl
7ca8e45d5d
Terrain: remove debug code
2015-11-06 20:21:39 +01:00
scrawl
ef18f4217f
Terrain: create 4x4 terrain chunks per ESM::Cell to improve performance
...
Improves performance because the number of splatting layers per chunk is reduced, and finer grained frustum culling can be done.
2015-11-06 20:14:57 +01:00
scrawl
95cf13e3f2
Terrain: make the blendmapSize and layerTileSize in FixedFunctionTechnique configurable
2015-11-06 15:23:37 +01:00
scrawl
b3f5ac5dbb
Include cleanup
2015-07-25 02:11:49 +02:00
scrawl
98571148b0
Remove custom license for terrain code
...
Now that it's no longer a stand-alone component, there's not much point in custom licensing it.
2015-06-14 20:44:29 +02:00
scrawl
db16cdad02
Add a comment
2015-06-09 03:16:41 +02:00
scrawl
5921e70625
Build a kdtree for terrain geometry
...
Improves intersection testing performance, shaving off ~2ms of frame time in exteriors.
Also increases terrain loading time by ~1ms per cell, so will have to look into background loading soon.
2015-06-09 02:29:56 +02:00
scrawl
e046119487
Fix for unnecessary terrain texture coordinate arrays
2015-06-04 16:15:26 +02:00
scrawl
cd47dff196
Minor cleanup
2015-06-03 03:03:16 +02:00
scrawl
b978153edb
Enable VBO sharing for terrain geometry
2015-06-03 02:24:09 +02:00
scrawl
5666e02546
Fix for dark terrain in some cases
2015-06-03 02:22:04 +02:00
scrawl
cdd0623009
Terrain rendering
2015-06-03 01:35:41 +02:00
scrawl
e1f4a7f647
Merge branch 'master' of https://github.com/OpenMW/openmw into osg
...
Conflicts:
apps/openmw/engine.cpp
apps/openmw/mwgui/mainmenu.cpp
apps/openmw/mwgui/windowmanagerimp.cpp
apps/openmw/mwinput/inputmanagerimp.cpp
apps/openmw/mwrender/animation.cpp
apps/openmw/mwrender/debugging.cpp
apps/openmw/mwrender/npcanimation.cpp
apps/openmw/mwrender/renderingmanager.cpp
apps/openmw/mwrender/sky.cpp
components/nif/nifkey.hpp
components/nif/nifstream.hpp
components/nifbullet/bulletnifloader.cpp
components/nifogre/ogrenifloader.hpp
libs/openengine/bullet/physic.cpp
libs/openengine/gui/manager.cpp
2015-05-04 02:41:50 +02:00
Marc Zinnschlag
83a7eea2a9
Merge remote-tracking branch 'scrawl/master'
2015-05-03 09:54:32 +02:00
Rohit Nirmal
997347b01e
Silence -Wreorder warnings.
2015-04-28 18:48:02 -05:00
scrawl
20af2b67a8
Change the triangle pattern used for terrain ( Fixes #2459 )
2015-04-17 18:54:14 +02:00
scrawl
af67de73a5
Delete shiny
2015-04-01 17:06:31 +02:00
dteviot
e197f5318b
fixing MSVC 2013 warning C4244: & C4305
...
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
2015-03-08 13:07:29 +13:00
dteviot
45b6538820
fixed MSVC 2013 warning C4800
...
forcing value to bool 'true' or 'false'
2015-03-06 23:19:57 +13:00
jacmoe
ee574e08ef
MIT License header added to all terrain component files.
2015-02-09 20:16:29 +01:00
scrawl
f8b4ff3004
Documentation fix
2015-02-05 04:18:43 +01:00
scrawl
7b4665c623
Terrain: documentation update
2015-01-13 05:37:44 +01:00
scrawl
261da8dd0a
Terrain: use 32-bit indices if necessary
2015-01-13 05:37:43 +01:00
scrawl
f7bac58b39
Terrain: change index buffer flags to unsigned
2015-01-13 05:37:43 +01:00
scrawl
ccab8b1a92
Fix bug in TerrainGrid::getWorldBoundingBox ( Fixes #2075 )
2014-10-29 16:01:55 +01:00
scrawl
eda296f1e3
Remove workaround for Ogre 1.8 (no longer supported)
2014-10-02 16:50:10 +02:00
scrawl
7252cb63a6
Fix cppcheck issues
2014-09-26 17:48:14 +02:00
scrawl
8c26f802e6
Move terrain grid implementation to a component so the editor can use it (Feature #1597 )
2014-08-08 15:46:33 +02:00
scrawl
2a510573b8
Remove unused implementation file
2014-07-17 16:16:14 +02:00
scrawl
e25fa6c157
Refactor non-distant land terrain path to a grid based implementation ( Fixes #1562 )
2014-06-29 02:42:36 +02:00
slothlife
9ea22324f7
Fix some MSVC warnings.
...
Several fixes are warnings about truncations on 64-bit, while others are
complaints about mixed signed / unsigned integer operations.
2014-06-23 01:13:30 -05:00