Commit Graph

25 Commits

Author SHA1 Message Date
AnyOldName3 535c5e328a Affect correct texture units when disabling shadows for stateset
Knowing which are right required making the function non-static, so the shadow manager had to become a singleton as the results of passing it around to where it's needed were hellish.

I'm seeing a bunch of OpenGL errors when actually using this, so I'll investigate whether they're happening on master.
I'm hesitant to look into it too much, though, as I'm affected by https://gitlab.com/OpenMW/openmw/-/issues/7811, and also have the Windows setting enabled that turns driver timeouts into a BSOD so a kernel dump is collected that I can send to AMD.
2024-02-20 21:02:31 +00:00
elsid f4efbcc1c4
Use settings values for Shadows settings 2023-11-02 16:36:44 +01:00
AnyOldName3 7d4410d4fb Use reserveGlobalTextureUnits for shadow maps 2023-02-09 01:32:48 +00:00
clang-format-bot ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Bo Svensson 98f8295765
allows to skip ComputeLightSpaceBounds traversal (#3152)
Currently, we always traverse the scene graph an additional time with a ComputeLightSpaceBounds visitor during shadow casting. ComputeLightSpaceBounds is only useful when the shadow casting mask allows us to shrink the bounds of the rendered scene, so we guard its traversal with a check against getCastsShadowTraversalMask. In practice, this guard never works because we build the traversal mask inclusively.

With this PR we limit the getCastsShadowTraversalMask check to relevant masks. This new check allows us to skip a superfluous ComputeLightSpaceBounds traversal with most settings.
2021-10-11 11:27:50 +02:00
elsid bd149b909f
Remove unused virtual modifiers in ShadowManager
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp💯9: warning: Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
        setupShadowSettings();
        ^
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp💯9: note: This constructor of an object of type 'ShadowManager' has not returned when the virtual method was called
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp💯9: note: Call to virtual function during construction
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp:104:9: warning: Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
        enableOutdoorMode();
        ^
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp:104:9: note: This constructor of an object of type 'ShadowManager' has not returned when the virtual method was called
/home/elsid/dev/openmw/components/sceneutil/shadow.cpp:104:9: note: Call to virtual function during construction
2019-11-17 18:26:56 +01:00
Capostrophic 05d94d35f9 Make disabled shadow defines map static 2019-04-29 19:31:46 +03:00
AnyOldName3 cfe921fb82 Remove uneeded includes. 2019-01-31 20:12:42 +00:00
AnyOldName3 199e6ed82d Revert "Use forward declaration to reduce build times."
This reverts commit 305b9826df.
2018-12-19 23:53:14 +00:00
AnyOldName3 305b9826df Use forward declaration to reduce build times. 2018-12-19 16:23:32 +00:00
AnyOldName3 474770eca8 Switch shadow map rendering to a specialised, simplified shader. 2018-10-16 21:23:31 +01:00
AnyOldName3 3bed2a7b01 Fix some copiler warnings (hopefully) 2018-03-03 02:01:03 +00:00
AnyOldName3 bc4b4c66e4 (Hopefully) add include which G++ requires even though VC++ doesn't. 2018-02-27 16:54:48 +00:00
AnyOldName3 66a114d6ec Fix a couple of warnings 2018-02-27 14:15:06 +00:00
AnyOldName3 f9cf1ac94b Separate indoor and outdoor shadow casting masks. 2018-02-27 00:13:51 +00:00
AnyOldName3 35eb71052e Tidy up the shadow manager 2018-02-26 23:52:46 +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
AnyOldName3 cb6767b4fc Move the declaration of ComputeLightSpaceBounds to the header so that it can be accessed from other compilation units.
(cherry picked from commit 8ac4fb208897a18da4934dd6f2fe84560b44ba9d)
2018-02-23 23:35:01 +00:00
AnyOldName3 bf9a1ded63 Mark a function as override 2018-01-02 16:39:05 +00:00
AnyOldName3 c3e0398d1c Add settings 2017-12-27 02:32:17 +00:00
AnyOldName3 c192c851db Make disabling shadows disable their performance impact, too. 2017-12-26 23:51:50 +00:00
AnyOldName3 98cd9fc144 Add preliminary support for global shader defines. 2017-11-22 20:07:07 +00:00
AnyOldName3 e201e359a9 Move Shadow to Components 2017-11-08 01:44:49 +00:00