Commit Graph

25 Commits (7b064920dbc1766a28279b72379b7f6383f88a4f)

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.
11 months ago
elsid f4efbcc1c4
Use settings values for Shadows settings 1 year ago
AnyOldName3 7d4410d4fb Use reserveGlobalTextureUnits for shadow maps 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
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.
3 years ago
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
5 years ago
Capostrophic 05d94d35f9 Make disabled shadow defines map static 6 years ago
AnyOldName3 cfe921fb82 Remove uneeded includes. 6 years ago
AnyOldName3 199e6ed82d Revert "Use forward declaration to reduce build times."
This reverts commit 305b9826df.
6 years ago
AnyOldName3 305b9826df Use forward declaration to reduce build times. 6 years ago
AnyOldName3 474770eca8 Switch shadow map rendering to a specialised, simplified shader. 6 years ago
AnyOldName3 3bed2a7b01 Fix some copiler warnings (hopefully) 7 years ago
AnyOldName3 bc4b4c66e4 (Hopefully) add include which G++ requires even though VC++ doesn't. 7 years ago
AnyOldName3 66a114d6ec Fix a couple of warnings 7 years ago
AnyOldName3 f9cf1ac94b Separate indoor and outdoor shadow casting masks. 7 years ago
AnyOldName3 35eb71052e Tidy up the shadow manager 7 years ago
AnyOldName3 e233dae1cd Hook up the new shadow technique 7 years ago
AnyOldName3 02d0ee3485 Rename old shadow class to shadow manager 7 years ago
AnyOldName3 9ec59783ba Add basic support for distant terrain CLSB
(cherry picked from commit 0f9dc3e65b72e6fff762f7a0933bae6f861e5fd4)
7 years ago
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)
7 years ago
AnyOldName3 bf9a1ded63 Mark a function as override 7 years ago
AnyOldName3 c3e0398d1c Add settings 7 years ago
AnyOldName3 c192c851db Make disabling shadows disable their performance impact, too. 7 years ago
AnyOldName3 98cd9fc144 Add preliminary support for global shader defines. 7 years ago
AnyOldName3 e201e359a9 Move Shadow to Components 7 years ago