Commit Graph

211 Commits (master)

Author SHA1 Message Date
AnyOldName3 84a9facedf Disable coverage adjustment for blended objects 4 years ago
AnyOldName3 0e57622bbe Correctly track added and removed state 4 years ago
AnyOldName3 2147c18cf5 Do not overwrite old removed state with old dummy state 4 years ago
AnyOldName3 0e122b1e3d Avoid copy and deep equality check 4 years ago
AnyOldName3 8a1b4bde8a Ensure original (removed) state overrides replacement state when recreating shaders
When the shader visitor replaces state (e.g. changes the deprecated
alpha test to a shader-based one) it backs up the original state. If
shaders are recreated, we need to know what the canonical state was and
create shaders to implement that instead of creating shaders to
implement dummy replacement state.

This was actually usually working as the removed state got checked after
the active state, so overwrote anything derived from it. However, if the
active state had the override bit set, that would make it override the
removed state.

Skipping any active state that duplicates removed state fixes this case.

Resolves #6108
4 years ago
Evil Eye 2be27da791 Merge branch 'const_refs' into 'master'
Add a ton of const refs

See merge request OpenMW/openmw!954
4 years ago
jvoisin 5840279f16 Use `default` instead of empty constructors/destructors
See https://pvs-studio.com/en/docs/warnings/v832/ for details
4 years ago
jvoisin 1123dc46ee Add a ton of const refs 4 years ago
glassmancody.info bb834fb44e append filename to shader names 4 years ago
Andrei Kortunov e309f75938 Join variables declaration and usage 4 years ago
glassmancody.info 582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 4 years ago
glassmancody.info 690995988b More formatting, OpenCS cells are unbroken 4 years ago
glassmancody.info 7370acdf54 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 4 years ago
glassmancody.info 43ac32921c Rewrite, support different lighting methods 4 years ago
glassmancody.info 9d9074c244 Add shared UBO 4 years ago
glassmancody.info dda735c54a initial commit 4 years ago
AnyOldName3 8ff4f731fb Make Coverity happy about A2C
Initialise member variable
4 years ago
Andrei Kortunov cf52bee188 Fix build with OSG 3.4 4 years ago
Alexei Dobrohotov 2fdbe9b3f6 Handle BSShader[PP/No]LightingProperty 4 years ago
AnyOldName3 0431ba4c87 Merge branch 'alpha-meddling-shader-side-mip-meddling' into alpha-meddling 4 years ago
AnyOldName3 9be258d260 Make it possible to reinstate FFP state easily 4 years ago
AnyOldName3 4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 4 years ago
Andrei Kortunov 14cf0ce1dc Implement instanced groundcover 4 years ago
AnyOldName3 b6e92c9c6d Use ShaderVisitor to skip translucent framebuffer specific stuff 4 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.
4 years ago
AnyOldName3 e3fd5efcfe Disable A2C for alpha-blended drawables 4 years ago
AnyOldName3 8f4b856b44 Initial A2C implementation 4 years ago
AnyOldName3 8c3a786e54 Unconditionally disable alpha testing when shaders are used 4 years ago
AnyOldName3 05ad44d0b1 Set correct array size 4 years ago
AnyOldName3 a080071588 Set default state sensibly 4 years ago
AnyOldName3 ce2bcba5d4 Replace deprecated alpha test in shader visitor 4 years ago
AnyOldName3 48f397f168 Remove existing shader when no longer required 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 72f7e6a702 Handle all shadow alpha uniforms in shadowsbin 4 years ago
Alexei Dobrohotov b523574090 Remove shader visitor settings manager dependency 4 years ago
Alexei Dobrohotov 53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
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
Mads Buvik Sandvei d5450a7d88 Correctly resetting line numbering during shader processing. 4 years ago
Mads Buvik Sandvei 0d6be9bd18 More accurate detection of cyclic includes 4 years ago
Mads Buvik Sandvei 2ed12a398d addLineDirectivesAfterConditionalBlocks move check for npos to catch all npos 4 years ago
elsid 40ad87bc4d
Replace OpenThreads by std types 5 years ago
Capostrophic c0b322b264 Improve color mode handling in shaders 5 years ago
psi29a b72720f357 Merge branch 'shadow-transparency-rework' into 'master'
Only alpha-test shadows when necessary

See merge request OpenMW/openmw!170
5 years ago
elsid 1f3dfaedcc
Add tests for ShaderManager 5 years ago
elsid edf002aa97
Rename argument shaderTemplate to templateName 5 years ago
AnyOldName3 a3b032bf2b Fix chameleon shadows 5 years ago
elsid 7aaec5e989
Log shader template name on parse error 5 years ago
AnyOldName3 53b9b41159 Rely on existing alpha test for non-blended shadow casting 5 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.
5 years ago
Capostrophic 5770227e37 Avoid using auto-detected normal maps that are bump map namesakes 5 years ago
Capostrophic 624a9ac353 Force shaders for objects affected by new envmap option 5 years ago
Capostrophic 19a7245251 Add bump mapping support 5 years ago
Andrei Kortunov 1cdd33b434 Implement additional stringops to avoid Boost functions 5 years ago
bzzt ffe8bbd2dd racingcrashfix #4766 6 years ago
Capostrophic 0cdc46dfd6 Move forcePPL and clamp to global shader defines (bug #4869) 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
AnyOldName3 244bd289cb Change default colour mode (as apparently it actually gets used sometimes) 6 years ago
AnyOldName3 a41ce42208 Move setting of colorMode to ShaderRequirements in case they're reused 6 years ago
AnyOldName3 474770eca8 Switch shadow map rendering to a specialised, simplified shader. 6 years ago
AnyOldName3 ce15369bbd Convert colorMode shader define to a uniform 6 years ago
AnyOldName3 0124be5713 Merge upstream/master 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
AnyOldName3 3ce96997d1 Remove sneaky tabs. 6 years ago
AnyOldName3 80082308f0 Merge upstream (shadermanager log system revamp) 6 years ago
Andrei Kortunov 1452684d9e Use new logging system for components 6 years ago
AnyOldName3 b08938485f Make suspending viewer threads the responsibility of the caller, not the shader manager. 7 years ago
AnyOldName3 229cc9696f Make updating global shader defines update shaders. 7 years ago
AnyOldName3 974e4d5299 Add check for null shaders when releasing OpenGL objects 7 years ago
AnyOldName3 98cd9fc144 Add preliminary support for global shader defines. 7 years ago
AnyOldName3 7a9df977c7 Add some prerequisits for making shadows disableable 7 years ago
AnyOldName3 166ba22072 Prevent line count changes within conditional blocks (because of conditional includes or @foreach expansion) ruining line numbering. 7 years ago
AnyOldName3 3d18ddc8e4 Take into account previous #line directives when expanding @foreach shader macros 7 years ago
AnyOldName3 590531595b Create @foreach shader preprocessor macro in preparation for moving shadow setup out of shadermanager.cpp 7 years ago
AnyOldName3 e201e359a9 Move Shadow to Components 7 years ago
AnyOldName3 1a30a917af Merge upstream/master 7 years ago
AnyOldName3 aa31cbba4f Attempt (and fail) to make the local map show without unwanted shadow 7 years ago
scrawl 244cc5b861 Reduce error spam 7 years ago
AnyOldName3 715f29165b Dynamically adjust shaders to have the required number of shadow maps. 7 years ago
scrawl 5d524a6a10 Add custom version of MorphGeometry replacing osgAnimation
Double buffering, custom bounding box and the update in the cull visitor (instead of update) are now all handled internally rather than needing hacks and/or callbacks.
7 years ago
scrawl f1ebb129c1 Fix ShaderVisitor to deal with the fact RigGeometry no longer derives from Geometry 7 years ago
scrawl b9931fb71c Set the shader on the node containing the StateSet 7 years ago
scrawl 4fba157d3b Implement releaseGLObjects for cached resources 7 years ago
Bret Curtis d48b829b45 replace and purge boost::lexical_cast 8 years ago
scrawl d8505e4f48 Fix a multithreading crash caused by modification of live Geometry 8 years ago
scrawl 058681ad73 ShaderVisitor: avoid reset of rig geometry when not required 8 years ago
scrawl 67e4a7e37b Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead 8 years ago
scrawl 792f505b2a Fix potential crash in ShaderVisitor for textures with no image assigned 8 years ago
scrawl 45ae8d5ffa Add support for GL_AMBIENT colorMode to shaders as required by particle systems 8 years ago
scrawl a5da3a269e Fix shadowing warnings 8 years ago
scrawl d1f6169889 Add special handling of RigGeometry tangents in ShaderVisitor 9 years ago
scrawl 6f31b3d79f Add parallax mapping for objects 9 years ago
scrawl df6fd5f206 Recognize normalHeightMap in the ShaderVisitor 9 years ago
scrawl 6e7c6fdd7e Implement NiTexturingProperty::DecalTexture 9 years ago
scrawl 062410bd8c Don't incorrectly remove TexEnv state 9 years ago
scrawl 90a99991d1 Use empty() instead of !size() 9 years ago
scrawl e25e0a0600 ShaderVisitor: assume the first texture unit is the diffuseMap 9 years ago
scrawl e7682e04ae Cleanup 9 years ago
scrawl 4ca6e91292 Fix in-code default settings so that we don't attempt to use shaders in OpenCS 9 years ago
scrawl 8f81df2bd3 Cleanup 9 years ago
scrawl 171e293641 ShaderManager: insert #line directives when including files 9 years ago
scrawl f01e8a6950 Add specular mapping for objects 9 years ago
scrawl 5cf2441b10 ShaderVisitor: support automatic recognition of normal maps based on file pattern
Introduce new settings 'auto use object normal maps', 'auto use terrain normal maps', 'normal map pattern'
9 years ago
scrawl 5e12a1b4ef Add enchanted item glow to the shader 9 years ago
scrawl 268594dcf1 Recreate shader in NpcAnimation::setAlpha 9 years ago
scrawl a73512afb7 Add shader settings to settings.cfg 9 years ago
scrawl 21c4dffed2 Add #include support in shaders 9 years ago
scrawl 22cc5c0965 Cache the Program 9 years ago
scrawl 456816f707 Use diffuse.a / vertex.a, use material emission 9 years ago
scrawl 9376811213 Vertex lighting shader 9 years ago
scrawl a9ad1b09e2 Introduce ShaderManager & ShaderVisitor
Actual shaders still to be written.
9 years ago