Commit Graph

108 Commits

Author SHA1 Message Date
glassmancody.info d195602a9d Switch to shared layout, some rewording 2021-04-13 11:09:35 -07:00
glassmancody.info 690995988b More formatting, OpenCS cells are unbroken 2021-04-13 11:09:35 -07:00
glassmancody.info 328ec85757 Code review cleanup, add setting documentation 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 8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
Alexei Dobrohotov 53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
Andrei Kortunov 065ed5138e Use emplace_back instead of push_back 2020-10-18 10:27:35 +04: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 b466bfee40 Enable light sources directly to avoid virtual calls 2019-03-21 10:27:50 +04:00
bzzt 8c649f05e6 Don't reallocate light list vector unnecessarily 2019-02-27 00:12:14 +03:00
AnyOldName3 4438ab4493 Use CullVisitor traversal mask for light manager. 2019-01-24 22:42:23 +00:00
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Bret Curtis f0b21cca22 use own inline hash_combine function 2017-06-12 00:32:28 +02:00
Bret Curtis 154d7cffa2 replace and purge boost::function 2017-06-09 19:08:53 +02:00
scrawl 34130fc5cc Fix handling in LightListCallback when the node is not a Group 2017-03-14 19:27:55 +01:00
scrawl b78a9f89af Refactor LightListCallback to allow for integration in custom Drawables. 2017-03-14 19:27:55 +01:00
scrawl 4aa40d16bc Increase the importance of light radius when sorting lights (Bug #2759) 2017-02-21 04:32:59 +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 839928e210 Fix light data being reset for the wrong light 2017-02-09 02:46:30 +01:00
scrawl c00532d82d Add LightStateCache to avoid redundantly setting the same gl_Light
Normally, osg::State would do this for us (via lastAppliedAttribute), but since we're using a custom StateAttribute to apply all lights at once, we have to track ourselves.

Further reduction of GL calls in a typical scene by ~2%
2017-02-07 23:37:57 +01:00
scrawl 4d4dc1b9c1 Add specialized DisableLight state attribute for more efficient undoing of light state
Seems to reduce # of GL calls by 10-15% in a typical scene.
2017-02-07 23:01:36 +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 174dd82894 Manually apply the osg::Light state
Reduce the amount of virtual function calls. Don't use the osg::Light's lightNum. Don't set spotlight state that we're not using (yet).
2016-03-11 15:43:20 +01:00
scrawl f898bf493f Don't use Geodes 2016-03-10 13:17:01 +01:00
scrawl 90a99991d1 Use empty() instead of !size() 2016-02-22 19:06:12 +01:00
scrawl 3e854a84a2 Slightly more efficient applying of light state 2016-02-18 19:37:57 +01:00
scrawl f93b7ec943 Fix light state issue
GLSL does not respect gl_Disable(GL_LIGHTX), so we have to set unused lights to zero.

Sadly, this change makes the applying of the modelView matrix less efficient. So far I couldn't find a better solution, osg's state tracker keeps getting in the way. :(
2016-02-18 19:37:57 +01:00
scrawl 9376811213 Vertex lighting shader 2016-02-18 19:37:57 +01:00
scrawl 93cc08a09c Lighting fix for LightListCallbacks attached to a Transform node 2016-01-11 23:10:16 +01:00
scrawl 438b30d6f0 Move configureLight to a separate file 2016-01-11 23:10:16 +01:00
scrawl 4a9b37aa53 Fix copy constructor issue 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 21e25f4756 Use the traversalNumber as frame number 2015-11-16 20:03:45 +01:00
scrawl 35459f20d5 Refactor lighting mask 2015-11-10 17:23:12 +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 49df6b7450 LightManager: fix incorrect view matrix for RELATIVE_RF cameras 2015-10-23 21:25:56 +02:00
scrawl 6dff11f847 Duplicate code fix 2015-10-23 18:16:26 +02:00
scrawl 8552a9d82c Add multiple camera support to LightManager 2015-10-23 01:58:22 +02:00
scrawl b3f5ac5dbb Include cleanup 2015-07-25 02:11:49 +02:00
scrawl 631cec7304 Take the radius of lights into account when sorting 2015-07-02 20:46:34 +02:00
scrawl aad8e7b6d0 Light culling fix 2015-06-15 19:37:44 +02:00
scrawl 18f4eaa8dc Preliminary handling for overflowing light lists 2015-06-15 18:56:40 +02:00
scrawl acf9fc2d37 Enable per-frame light list updates (Bug #2638, Bug #2654)
The performance impact isn't so big anymore since the last commit.
2015-06-15 18:15:26 +02:00
scrawl 1d198a5592 Keep the light list StateSet cache for more than one frame 2015-06-15 18:09:01 +02:00
scrawl 5a7f2a4f1f Restore light attenuation settings 2015-06-02 17:02:56 +02:00
scrawl 3dcb167066 Map rendering 2015-05-26 16:40:44 +02:00
scrawl 8b768f4377 Minor fix for behaviour with non-existing LightManager 2015-05-18 21:06:42 +02:00
scrawl 987e923790 LightManager optimization 2015-04-12 19:44:48 +02:00
scrawl 61aaf0cf70 Attach light lists to the object base nodes instead of each renderable
Apparently that is how Ogre worked (on the SceneNode) so let's roll with it for now. Have not tested yet what MW does.
2015-04-12 18:03:36 +02:00
scrawl c92592493e OpenMW: create a window and render the starting cell(s) 2015-04-12 15:38:30 +02:00
scrawl 591a35b8d7 *very* early version of the LightManager 2015-04-10 23:16:17 +02:00