Commit Graph

80 Commits (868a5b35e3912245dd28669dbb96800879664991)

Author SHA1 Message Date
Bret Curtis 868a5b35e3 workaround shadow issue on macOS, https://gitlab.com/OpenMW/openmw/-/issues/6057 3 years ago
jvoisin d45184a730 Sprinkle some const-ref to avoid unnecessary copies 3 years ago
AnyOldName3 ceb6a280ff Fix typo
Hopefully this will actually let us make better use of shadow bounds,
but I wouldn't count on it.
3 years ago
AnyOldName3 0431ba4c87 Merge branch 'alpha-meddling-shader-side-mip-meddling' into alpha-meddling 3 years ago
AnyOldName3 4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 3 years ago
AnyOldName3 3e273a759a Clarify method name now we're using it differently 3 years ago
madsbuvi 7edaa50195 another approach 3 years ago
Andrei Kortunov 801e2d6ad0 Avoid to use uninitialized variables 3 years ago
AnyOldName3 4ed3252001 Check for EXT_gpu_shader4 CPU-side
Mesa lies and always defines GL_EXT_gpu_shader4 even when the extension
isn't present.
3 years ago
AnyOldName3 8f4b856b44 Initial A2C implementation 3 years ago
AnyOldName3 11b4af49ce Allow shadowsbin to optimise clockwise-wound meshes when face culling is off 3 years ago
AnyOldName3 cc2ce9fa3e Explicitly default-construct array
The docs seem to imply this is automatic when the array contains a
class-type, which osg::ref_ptr is, but I got a crash log that doesn't
make sense if that's true.
3 years ago
AnyOldName3 ce2bcba5d4 Replace deprecated alpha test in shader visitor 3 years ago
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
4 years ago
AnyOldName3 1e0df23d14 Merge branch 'shadows-bin' into 'master'
Use a custom renderbin to avoid pointless OpenGL state switches

See merge request OpenMW/openmw!402
4 years ago
AnyOldName3 55f65752fd Don't bind unnecessary colour buffer when drawing shadow maps 4 years ago
AnyOldName3 72f7e6a702 Handle all shadow alpha uniforms in shadowsbin 4 years ago
Alexei Dobrohotov 53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
4 years ago
AnyOldName3 f7dddb8857 Merge branch '3' of https://gitlab.com/bzzt/openmw into shadows-bin
This won't actually work.
4 years ago
Andrei Kortunov 065ed5138e Use emplace_back instead of push_back 4 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
AnyOldName3 fd14dad789 const osg::ref_ptf reference should be faster than value as constructor and destructor are non-trivial
I played around in GodBolt and got into an argument to determine this. The difference will be immeasurably small, but my curiosity has been satisfied.
4 years ago
AnyOldName3 707204133d Double-buffer shadow uniforms that change each frame 4 years ago
AnyOldName3 ce98d7053b Double buffer view-dependent data stateset 4 years ago
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.
4 years ago
elsid 40ad87bc4d
Replace OpenThreads by std types 4 years ago
bzzt lost a hitlab login daa2761c2d alphablending & billboardfix
Signed-off-by: Bret Curtis <psi29a@gmail.com>
4 years ago
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.
4 years ago
bzzt d340224c95 shadowsbin for gl state reduction 5 years ago
bzzt b6ed2f1718 Add optional shadow map max distance and fading 5 years ago
Andrei Kortunov b2fca46206 Fix a couple of minor issues in shadows 5 years ago
Andrei Kortunov bacaa1f789 Get rid of C-style limits in the shadows code 5 years ago
elsid 47e87cc2bd
Fix ODR violation for VDSMCameraCullCallback
This class is also defined in OpenSceneGraph at global namespace.
5 years ago
AnyOldName3 0c8ad0a3bb Double buffer debug HUD frustum geometries to prevent race conditions. 5 years ago
AnyOldName3 15547750ba Correct behaviour of use front face culling setting to not use back face culling either when disabled. 5 years ago
AnyOldName3 d82c85913a Don't bother multiplying a matrix by its inverse and applying that to the light direction.
Hopefully this will improve numerical stability and reduce shadow flicker a little.
5 years ago
AnyOldName3 7b108ae9a2 Disable depth sorting for translucent objects in the shadow maps 5 years ago
AnyOldName3 2d5da1a6fa Don't exclusively rely on a shadow map if its bounds have been expanded since the cull traversal. 6 years ago
AnyOldName3 0a409c0ab8 Make shadow map front-face culling configurable 6 years ago
AnyOldName3 dd207d9e54 Make the shadow polygon offset parameters configurable 6 years ago
AnyOldName3 aa11832949 Resolve bugs with depth-clamped shadow maps 6 years ago
AnyOldName3 7ad4882f0c Fix debug hud frustum outline disappearence 6 years ago
AnyOldName3 061fa57335 Switch to better-performing data types for debug hud geometry 6 years ago
AnyOldName3 632b0d8979 Make shadow maps use their whole depth range for the overlap with the view frustum and rely on depth clamping to ensure objects outside the frustum still cast shadows. 6 years ago
AnyOldName3 660e423e99 Correct debug hud frustum colour 6 years ago
AnyOldName3 b0907f8929 Add todos in case they're left until after the shadow PR is merged 6 years ago
AnyOldName3 474770eca8 Switch shadow map rendering to a specialised, simplified shader. 6 years ago
AnyOldName3 db707a31ec Add clipping planes when allow shadow map overlap is enabled 6 years ago
AnyOldName3 15e820825f Fix another convex hull clipping issue and restore z-clipping 6 years ago
AnyOldName3 dd501f4132 Make ConvexHull::clip more resilient against large values. 6 years ago