Commit Graph

58 Commits (master)

Author SHA1 Message Date
Alexei Kotov 71c1b536b4 Discard culled lights specifically for post-processing light buffer 7 months ago
Alexei Kotov 916706c6c1 Make object light lists (mostly) view-independent
Remove frustum culling
Sort lights by object proximity
Restore multiple camera rendering optimization
7 months ago
elsid 08902371b4
Use settings values for Shaders settings 1 year ago
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
elsid bb8b5e2108
Add META_Node to clang-format StatementMacros 2 years ago
elsid 063fff7fa4
Fix and prevent -Wextra-semi warning 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 9ac3bb753e
Move declaration private static member variables of LightManager to .cpp
There is no need to expose them to other translation units.
3 years ago
elsid 4211cf1c24
Use uniform indent and apply openmw naming policy 3 years ago
glassmancody.info 8146b05c92 pass only lights with visible geometry 3 years ago
glassmancody.info 327b8ecdcb pass sorted lights to light postprocess light buffers 3 years ago
cody glassman 30a64ee82a move to world space, fix bug with uniform size updates 3 years ago
cody glassman 0cb63ca4e6 experimental point light bindings 3 years ago
glassmancody.info 750514cda2 simply lightmanager and fix racey behavior 3 years ago
Bo Svensson 1979ee1491
refactors hashed std::map (#3199)
We currently apply a strange algorithm to `LightManager::mStateSetCache`. For some reason this algorithm inserts hashed keys into `std::map` in a way that fails to handle hash collisions and exhibits worse lookup complexity than `std::unordered_map`. With this PR we just use `std::unordered_map` here.
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 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
Andrei Kortunov 11c57978b6 Fix crashes on exit in the LightManager (bug #6044) 4 years ago
glassmancody.info 16856d45c5 Lighting Patch
Fixes build errors with older OSG builds and some issues with 'shared' layout.
Bring back ambient in inventory through lightmodel instead of sun ambient, mirrors scene ambient/sunlight relationship.
Forces shaders when certain lighting methods are enabled and finalize settings.
Correctly override sun for localmap.
4 years ago
glassmancody.info 9e80091aff clear up force shaders and make it less convoluted 4 years ago
glassmancody.info 8ce65232ff fix race condition with sun uniform 4 years ago
glassmancody.info eecb9886a9 Shader cleanup, fix indicies 4 years ago
glassmancody.info 4ba473b684 Finalize settings, torch fix 4 years ago
glassmancody.info 71c30a31df in-game settings, some require restart 4 years ago
glassmancody.info 690995988b More formatting, OpenCS cells are unbroken 4 years ago
glassmancody.info 05a5cee132 Brighter point lights and light fade 4 years ago
glassmancody.info 43ac32921c Rewrite, support different lighting methods 4 years ago
glassmancody.info 9d9074c244 Add shared UBO 4 years ago
glassmancody.info dda735c54a initial commit 4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
bzzt 1a65adacdd Do not allocate dummy LightStateAttribute's for every stateset 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
scrawl b78a9f89af Refactor LightListCallback to allow for integration in custom Drawables. 8 years ago
scrawl 67e4a7e37b Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead 8 years ago
scrawl 34deb6e7b1 Add 'showSceneGraph' command to export the scene or a particular object to .osgt for debugging purposes 8 years ago
MiroslavR 11565b5966 Make actors with non-portable lights in inventory glow (Closes #2042, #3338) 8 years ago
scrawl aec8c38461 Move observer_ptr include where it belongs 9 years ago
scrawl 438b30d6f0 Move configureLight to a separate file 9 years ago
scrawl e39f49a88f OSG extensions namespace fixes 9 years ago
scrawl c442af09c5 Write more documentation for the lighting system 9 years ago
scrawl 8e9571d155 Double buffer the light StateAttributes and StateSets
Fixes a race condition where the position of a light could jump a frame ahead.
9 years ago
scrawl 1b77428c59 Use const reference, thanks ace13 9 years ago
scrawl fc7456e0a1 Explicitely opt for float matrices in performance critical places 9 years ago
scrawl 35459f20d5 Refactor lighting mask 9 years ago
scrawl bd8332d2b0 Remove default copyop argument for nodecallback copy constructors
Works around a compiler warning with OSG 3.4:

warning: base class 'class osg::Callback' should be explicitly initialized in the copy constructor [-Wextra]

With no default argument for osg::CopyOp&, the compiler no longer sees the function as a real copy constructor and stops warning about the missing virtual initializations.

We don't care about this warning because there is nothing interesting to initialize in the osg::NodeCallback base anyway.

A proper fix for the warning would require to inserting OSG_VERSION conditional compiling all over the place, that is as long as we are still supporting OSG 3.2.
9 years ago
scrawl 0210b87ffc Revert "Fix LightSource crash"
This reverts commit f336c6db87.

Root cause should be fixed in next commit.
9 years ago
scrawl c996702b56 Fix some uninitialised variables found by static analysis 9 years ago
scrawl c23609e22b Cache the light list in LightListCallback
When multiple cameras are rendering, the later cameras can reuse the light lists from the first camera.
9 years ago
scrawl f336c6db87 Fix LightSource crash 9 years ago
scrawl 49df6b7450 LightManager: fix incorrect view matrix for RELATIVE_RF cameras 9 years ago