Commit Graph

5313 Commits (c9279d413780096404f4785b99e6471c410c8e62)

Author SHA1 Message Date
Bret Curtis 8d37d79d6c
Merge pull request #3154 from bosvensson1/patch-29
improves RemoveRedundantNodesVisitor performance for large children vectors
3 years ago
Bo Svensson 08608da62c
optimizer.cpp 3 years ago
Bo Svensson 87d52dc1fd
fixes coverity-ci warning 3 years ago
Bo Svensson cd4d76f8c5
discard off-screen lights (#3120)
Currently, we run culling tests against all lights in the scene during LightListCallback::pushLightState. We can avoid most of these tests by removing off-screen lights at an earlier stage. We should benchmark the cumulative time spent within LightListCallback::pushLightState before and after this PR.
3 years ago
Bo Svensson 787f91211d resets state updater to apply light settings (#3141)
resets state updater to apply light settings

With this PR we achieve the same effect with fewer lines of code.
3 years ago
psi29a c3f5e8f968 Merge branch 'lua_transform' into 'master'
3D transforms in Lua

See merge request OpenMW/openmw!1235
3 years ago
Bo Svensson 4b1c009ffd
use StateSet define for translucentFramebuffer (#3138)
With this PR we test out osg's shader define system for a somewhat harmless feature. As we can see, our code becomes more concise and efficient in this case. Most importantly, we no longer create unneeded vertex shader objects.
3 years ago
Bo Svensson b2af81bc18
converts remaining osg::NodeCallback (#3147)
With this PR we convert remaining instantiations of the deprecated osg::NodeCallback in Open MW to SceneUtil::NodeCallback.
3 years ago
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.
3 years ago
Bo Svensson 14d15dcfac
cleans up osgacontroller.cpp (#3142)
`handle_stateset` is not needed because `UpdateMatrixTransform` is a `NodeCallback` only allowed to be set on a `Node`. `Geode` and `Drawable` do not need explicit logic because they are both derived from `Node`.
3 years ago
Bo Svensson aaf7b423d6
adds a replacement for osg::NodeCallback (#3144)
* nodecallback.hpp

* lightmanager.hpp

* lightmanager.cpp

* lightmanager.hpp

* nodecallback.hpp

* nodecallback.hpp

* [ci skip]

* lightmanager.hpp

* nodecallback.hpp

* nodecallback.hpp

* lightmanager.cpp

* lightmanager.cpp

* nodecallback.hpp

* [ci skip]

* [ci skip]

* controller.cpp

* [ci skip]

* osgacontroller.cpp

* keyframe.hpp

* controller.hpp

* keyframe.hpp

* [ci skip]

* keyframe.hpp

* animation.hpp

* [ci skip]

* weaponanimation.cpp

* nodecallback.hpp
3 years ago
psi29a 2c8c36fe5d Merge branch 'master' into 'effective_magic'
# Conflicts:
#   CHANGELOG.md
3 years ago
Bo Svensson 2568f119a4
reapplies PR without npe (#3137)
* avoids creating empty statesets on drawables

Currently, we attempt to skip creating state on drawable nodes when this state matches the default state. This attempt is incomplete because we still create an avoidable empty stateset in the default case.

* renderingmanager.cpp

* nifloader.cpp

* nifloader.cpp

* shadervisitor.cpp
3 years ago
Petr Mikheev 24ecdc37a7 Fix crash in LuaUtil::ScriptsContainer::~ScriptsContainer() 3 years ago
Evil Eye dc1fe62dde Overhaul magic effects to work with onApply and onEnd events 3 years ago
Andrei Kortunov e109d86489 Revert "avoids creating empty statesets on drawables (#3132)"
This reverts commit 957c25a491.
3 years ago
Bret Curtis b7c1d9edb0 remove unnecessary includes 3 years ago
Bo Svensson d8707a763f
fixes build (#3134)
* quadtreeworld.cpp

* renderingmanager.cpp [ci skip]

* quadtreeworld.hpp

* cellborder.hpp

* cellborder.cpp
3 years ago
Bret Curtis 803195a05f add back some explicit includes 3 years ago
Bo Svensson 8358418555
set the correct program link parameters (#3110)
* shadermanager.hpp setProgramTemplate

* shadermanager.hpp

* shadermanager.cpp setProgramTemplate

* shadervisitor.hpp setProgramTemplate

* shadervisitor.cpp setProgramTemplate

* scenemanager.cpp setProgramTemplate

* scenemanager.hpp setProgramTemplate

* renderingmanager.cpp

* groundcover.cpp setProgramTemplate

* groundcover.hpp

* groundcover.cpp

* shadervisitor.cpp

* util.cpp

* lightmanager.cpp

* scenemanager.cpp

* scenemanager.hpp

* lightmanager.cpp

* lightmanager.cpp

* lightmanager.cpp

* scenemanager.hpp [ci skip]

* water.cpp

* groundcover.cpp

* shadermanager.hpp
3 years ago
Bo Svensson 957c25a491
avoids creating empty statesets on drawables (#3132)
* avoids creating empty statesets on drawables

Currently, we attempt to skip creating state on drawable nodes when this state matches the default state. This attempt is incomplete because we still create an avoidable empty stateset in the default case.

* renderingmanager.cpp

* nifloader.cpp
3 years ago
Andrei Kortunov fc2076db1a
Fix MSVC warnings about local variables redeclaration (#3130) 3 years ago
Petr Mikheev 48538d5cef 3D transforms in Lua 3 years ago
psi29a 5794a3b346 Merge branch 'lua_raycasting' into 'master'
Lua raycasting

Closes #6098

See merge request OpenMW/openmw!1175
3 years ago
Bo Svensson e41fe7573a
avoids creating empty statesets for collada nodes (#3128)
* avoids creating empty statesets for collada nodes

With this PR we avoid creating empty statesets for collada nodes which will be detrimental to osg's draw performance.

* scenemanager.cpp
3 years ago
Petr Mikheev fb3917fc1a Lua callbacks 3 years ago
Bo Svensson 5fde6867a2
removes unused code (#3129)
* scenemanager.cpp

* scenemanager.hpp

* scenemanager.cpp

* stats.cpp

* renderingmanager.cpp
3 years ago
Bret Curtis 9fabf99250 remove mDebugChunks from chunkManager 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 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
3 years ago
psi29a 782e0710af Merge branch 'OpenCS-preserve-blocked' into 'master'
OpenCS - Preserve "blocked" record flags when saving. #6288

Closes #6288

See merge request OpenMW/openmw!1052
3 years ago
psi29a 47eda85b9f Merge branch 'master' into 'the_goal_is_elevation'
# Conflicts:
#   CHANGELOG.md
3 years ago
Bo Svensson c6f7137ee1
fixes bugs with share state (#3111)
* optimizer.cpp merge fix

* objectpaging.cpp

* optimizer.hpp setSharedStateManager

* optimizer.cpp shareState

* scenemanager.cpp shareState

* scenemanager.cpp

* optimizer.cpp

* optimizer.cpp

* scenemanager.cpp

* optimizer.cpp
3 years ago
Evil Eye c679565893 Make names starting with digits use normal name parsing code 3 years ago
psi29a aa11238be1 Merge branch 'colladaalphatest' into 'master'
Collada alpha testing

See merge request OpenMW/openmw!1177
3 years ago
Cédric Mocquillon b676d93e03 Use a pair of iterator to represents a range for directory listing 3 years ago
Bo Svensson d38c8c6dcb
optimise chunk drawing order (#3116)
* material.cpp

* material.cpp
3 years ago
Evil Eye 786b6b7c9a Merge branch 'lua_util' into 'master'
Move LuaState::makeReadOnly(sol::table) out of the class

See merge request OpenMW/openmw!1229
3 years ago
unelsson 67894349a9 Add a check for OPAQUE_BIN 3 years ago
unelsson f2a894024a Change debug levels 3 years ago
unelsson ec0b36d21d Don't make a new osg::depth to alpha tested node 3 years ago
unelsson 96f02ab32c Per-material alpha testing for collada 3 years ago
unelsson 40497d6fe5 Set depth testing for alpha blend & test, depth writes off for blend. 3 years ago
unelsson b3d1d106af Collada alpha testing and uniforms 3 years ago
Evil Eye 6d7cb38834 Remove duplicate GetSquareRoot implementation 3 years ago
Petr Mikheev 2f25257a3e Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals. 3 years ago
Bo Svensson 095f4b2ed5
material.cpp (#3117) 3 years ago
Bret Curtis 8d86d90782 remove whitespace 3 years ago
Bo Svensson 179f91276a
lightmanager.cpp (#3121) 3 years ago
psi29a 68db9869f5 Merge branch 'DistantTerrainDebugChunks' into 'master'
Debug terrain chunks

See merge request OpenMW/openmw!1169
3 years ago