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

56 commits

Author SHA1 Message Date
elsid
08902371b4
Use settings values for Shaders settings 2023-10-12 20:43:53 +02:00
jvoisin
3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
elsid
bb8b5e2108
Add META_Node to clang-format StatementMacros 2022-10-06 21:11:52 +02:00
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning 2022-10-06 00:26:43 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid
9ac3bb753e
Move declaration private static member variables of LightManager to .cpp
There is no need to expose them to other translation units.
2022-07-08 17:21:01 +02:00
elsid
4211cf1c24
Use uniform indent and apply openmw naming policy 2022-07-08 17:14:13 +02:00
glassmancody.info
8146b05c92 pass only lights with visible geometry 2022-06-04 21:01:01 -07:00
glassmancody.info
327b8ecdcb pass sorted lights to light postprocess light buffers 2022-06-04 20:33:21 -07:00
cody glassman
30a64ee82a move to world space, fix bug with uniform size updates 2022-05-24 22:30:25 -07:00
cody glassman
0cb63ca4e6 experimental point light bindings 2022-05-15 10:03:58 -07:00
glassmancody.info
750514cda2 simply lightmanager and fix racey behavior 2021-11-18 19:40:13 -08:00
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.
2021-11-04 16:54:47 +01:00
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.
2021-10-06 11:53:24 +02:00
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
2021-10-04 10:56:55 +02:00
Andrei Kortunov
11c57978b6 Fix crashes on exit in the LightManager (bug #6044) 2021-05-17 13:01:15 +04:00
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.
2021-04-16 11:55:40 -07:00
glassmancody.info
9e80091aff clear up force shaders and make it less convoluted 2021-04-13 11:09:49 -07:00
glassmancody.info
8ce65232ff fix race condition with sun uniform 2021-04-13 11:09:49 -07:00
glassmancody.info
eecb9886a9 Shader cleanup, fix indicies 2021-04-13 11:09:49 -07:00
glassmancody.info
4ba473b684 Finalize settings, torch fix 2021-04-13 11:09:49 -07:00
glassmancody.info
71c30a31df in-game settings, some require restart 2021-04-13 11:09:49 -07:00
glassmancody.info
690995988b More formatting, OpenCS cells are unbroken 2021-04-13 11:09:35 -07:00
glassmancody.info
05a5cee132 Brighter point lights and light fade 2021-04-13 11:09:35 -07:00
glassmancody.info
43ac32921c Rewrite, support different lighting methods 2021-04-13 11:09:19 -07:00
glassmancody.info
9d9074c244 Add shared UBO 2021-04-13 11:07:48 -07:00
glassmancody.info
dda735c54a initial commit 2021-04-13 11:06:16 -07:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
bzzt
1a65adacdd Do not allocate dummy LightStateAttribute's for every stateset 2019-03-30 21:36:08 +04:00
Andrei Kortunov
e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
scrawl
b78a9f89af Refactor LightListCallback to allow for integration in custom Drawables. 2017-03-14 19:27:55 +01:00
scrawl
67e4a7e37b Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead 2017-02-09 04:51:20 +01:00
scrawl
34deb6e7b1 Add 'showSceneGraph' command to export the scene or a particular object to .osgt for debugging purposes 2017-02-01 06:00:14 +01:00
MiroslavR
11565b5966 Make actors with non-portable lights in inventory glow (Closes #2042, #3338) 2016-10-08 23:17:12 +02:00
scrawl
aec8c38461 Move observer_ptr include where it belongs 2016-01-25 21:03:33 +01:00
scrawl
438b30d6f0 Move configureLight to a separate file 2016-01-11 23:10:16 +01:00
scrawl
e39f49a88f OSG extensions namespace fixes 2015-12-06 15:27:43 +01:00
scrawl
c442af09c5 Write more documentation for the lighting system 2015-12-04 18:08:32 +01:00
scrawl
8e9571d155 Double buffer the light StateAttributes and StateSets
Fixes a race condition where the position of a light could jump a frame ahead.
2015-12-04 00:06:22 +01:00
scrawl
1b77428c59 Use const reference, thanks ace13 2015-11-24 03:42:35 +01:00
scrawl
fc7456e0a1 Explicitely opt for float matrices in performance critical places 2015-11-22 19:54:27 +01:00
scrawl
35459f20d5 Refactor lighting mask 2015-11-10 17:23:12 +01:00
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.
2015-11-09 18:57:17 +01:00
scrawl
0210b87ffc Revert "Fix LightSource crash"
This reverts commit f336c6db87.

Root cause should be fixed in next commit.
2015-11-06 23:14:27 +01:00
scrawl
c996702b56 Fix some uninitialised variables found by static analysis 2015-11-04 20:34:50 +01:00
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.
2015-11-04 00:19:15 +01:00
scrawl
f336c6db87 Fix LightSource crash 2015-10-29 00:51:35 +01:00
scrawl
49df6b7450 LightManager: fix incorrect view matrix for RELATIVE_RF cameras 2015-10-23 21:25:56 +02:00
scrawl
8552a9d82c Add multiple camera support to LightManager 2015-10-23 01:58:22 +02:00
scrawl
18f4eaa8dc Preliminary handling for overflowing light lists 2015-06-15 18:56:40 +02:00