Commit Graph

41 Commits

Author SHA1 Message Date
AnyOldName3 4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 2021-02-14 22:42:55 +00:00
AnyOldName3 3e273a759a Clarify method name now we're using it differently 2021-02-06 16:41:46 +00:00
AnyOldName3 05ad44d0b1 Set correct array size 2020-12-18 01:44:46 +00:00
AnyOldName3 ce2bcba5d4 Replace deprecated alpha test in shader visitor 2020-12-17 14:57:43 +00:00
AnyOldName3 7768556ce6 Set dummy state when disabling shadows indoors
As we don't reconfigure all shaders without shadows when we disable them
indoors (as it'd probably add a hitch to transitioning in and out) we
need to set up dummy state so the shaders don't do anything illegal.

This hadn't had symptoms for most objects as when indoors, nearly
everything would be drawn first in one of the water RTTs, which had
dummy state to disable shadows already. This wasn't true of the water
plane itself, though, yet somehow it took until just now for anyone to
report that.

This resolves vtastek's issue where the water would be invisible indoors
2020-11-16 21:01:20 +00:00
AnyOldName3 72f7e6a702 Handle all shadow alpha uniforms in shadowsbin 2020-11-12 00:26:30 +00:00
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
AnyOldName3 707204133d Double-buffer shadow uniforms that change each frame 2020-08-20 00:38:13 +01:00
AnyOldName3 ce98d7053b Double buffer view-dependent data stateset 2020-08-19 22:55:41 +01:00
AnyOldName3 98b2d5d921 Make shadow debug HUD thread-safe
* Double buffer the frustum uniforms.
* Don't mess with the debug geometry's StateSet.
* Change two-element vectors to arrays so the size is explicit.
2020-08-19 19:29:19 +01:00
elsid 40ad87bc4d
Replace OpenThreads by std types 2020-06-25 22:16:09 +02:00
AnyOldName3 12044a607b Only alpha-test shadows when necessary
Previously we always discarded shadow map fragments if the alpha channel of the output would have been low, but there were some (modded) assets that have non-one alpha but have testing or blending disabled so end up opaque anyway. This lets the shadows of those objects match.
2020-04-10 15:45:37 +01:00
elsid 2e1d8a5e55
Remove unused virtual modifiers in DebugHUD
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: warning: Call to virtual function during construction [clang-analyzer-optin.cplusplus.VirtualCall]
        addAnotherShadowMap();
        ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is true.  Entering loop body
    for (int i = 0; i < 2; ++i)
    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is true.  Entering loop body
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3094:5: note: Loop condition is false. Execution continues on line 3102
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3126:21: note: Assuming 'i' is < 'numberOfShadowMapsPerLight'
    for (int i = 0; i < numberOfShadowMapsPerLight; ++i)
                    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3126:5: note: Loop condition is true.  Entering loop body
    for (int i = 0; i < numberOfShadowMapsPerLight; ++i)
    ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: note: This constructor of an object of type 'DebugHUD' has not returned when the virtual method was called
        addAnotherShadowMap();
        ^
/home/elsid/dev/openmw/components/sceneutil/mwshadowtechnique.cpp:3127:9: note: Call to virtual function during construction
2019-11-17 18:50:11 +01:00
bzzt b6ed2f1718 Add optional shadow map max distance and fading 2019-11-02 18:06:39 +03:00
AnyOldName3 d34724a3c4 Hopefully fix Clang warning about hiding overloaded virtual functions 2019-03-07 20:46:10 +00:00
AnyOldName3 0c8ad0a3bb Double buffer debug HUD frustum geometries to prevent race conditions. 2019-02-19 18:13:03 +00:00
AnyOldName3 0a409c0ab8 Make shadow map front-face culling configurable 2018-12-01 00:26:43 +00:00
AnyOldName3 dd207d9e54 Make the shadow polygon offset parameters configurable 2018-11-30 00:55:54 +00:00
AnyOldName3 061fa57335 Switch to better-performing data types for debug hud geometry 2018-11-21 22:38:50 +00:00
AnyOldName3 474770eca8 Switch shadow map rendering to a specialised, simplified shader. 2018-10-16 21:23:31 +01:00
AnyOldName3 db707a31ec Add clipping planes when allow shadow map overlap is enabled 2018-08-23 13:14:02 +01:00
AnyOldName3 2c30bc1b4f Accidentally fix the one remaing case where shadows look awful while refactoring some stuff. 2018-05-18 22:39:57 +01:00
AnyOldName3 7255c266ba Merge branch 'osgshadow-test-vdsm' into osgshadow-test-dicking-around-with-cascading-shadow-maps 2018-05-16 21:21:05 +01:00
AnyOldName3 fc1aee10f4 Remove function declaration that somehow snuck in. 2018-05-16 21:20:17 +01:00
AnyOldName3 1b30d47d7f Add a hacky temporary version of cascading shadow maps 2018-05-13 12:56:40 +01:00
AnyOldName3 166e7df778 Improve debug HUD frustum 2018-05-11 19:08:42 +01:00
AnyOldName3 4547151863 Add the view frustum to the debug HUD (in the most annoying way possible) 2018-05-05 00:08:00 +01:00
AnyOldName3 882b63cba9 Make split point control parameters configurable with the new shadow technique. 2018-02-26 23:00:46 +00:00
AnyOldName3 e233dae1cd Hook up the new shadow technique 2018-02-26 22:27:09 +00:00
AnyOldName3 97b607fc66 Make whitespace match upstream OSG 2018-02-26 21:10:06 +00:00
AnyOldName3 639a4f5e8c Remove TODO left in by accident. Also, become 100 commits ahead of upstream. 2018-02-26 20:52:19 +00:00
AnyOldName3 478367bef3 Ensure the debug HUD won't crash if settings are changed at runtime. 2018-02-26 20:50:54 +00:00
AnyOldName3 7b52091a82 Make the debug hud enableable 2018-02-26 20:36:43 +00:00
AnyOldName3 5d719e9d5f Add the debug HUD to the new shadow technique 2018-02-26 20:20:01 +00:00
AnyOldName3 76f23c28b1 Make shadows disableable. 2018-02-26 16:25:44 +00:00
AnyOldName3 4c31b38f77 Move CLSB changes to new shadow technique 2018-02-26 14:58:12 +00:00
AnyOldName3 06b2ce6646 Fix alignment issues caused by renaming classes 2018-02-26 14:34:14 +00:00
AnyOldName3 7bd4c5e4b3 Change class name 2018-02-24 00:57:58 +00:00
AnyOldName3 c815366044 Move to the correct namespace part 2 2018-02-24 00:55:24 +00:00
AnyOldName3 11e59d3c11 Move to the correct namespace. 2018-02-24 00:52:46 +00:00
AnyOldName3 324b398d29 Add a notice clarifying the source of the shadow technique files. 2018-02-24 00:15:54 +00:00