Bo Svensson
2cebd19432
shadervisitor.cpp
2021-09-14 11:37:23 +00:00
Bo Svensson
3415f12e12
shadervisitor.cpp
2021-09-14 11:30:07 +00:00
Bo Svensson
6d12a240a3
shadervisitor.cpp uniform
2021-09-12 09:23:36 +00:00
jvoisin
7a015d24c6
Sprinkle some const-ref
2021-08-15 19:50:28 +02:00
AnyOldName3
5ec2ddb4a0
Actually increment iterators to be erased.
2021-07-17 20:47:55 +01:00
AnyOldName3
84a9facedf
Disable coverage adjustment for blended objects
2021-07-04 23:29:22 +01:00
AnyOldName3
0e57622bbe
Correctly track added and removed state
2021-07-03 21:04:17 +01:00
AnyOldName3
2147c18cf5
Do not overwrite old removed state with old dummy state
2021-06-28 00:11:31 +01:00
AnyOldName3
0e122b1e3d
Avoid copy and deep equality check
2021-06-27 01:48:06 +01:00
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
2021-06-27 00:12:07 +01:00
jvoisin
5840279f16
Use default
instead of empty constructors/destructors
...
See https://pvs-studio.com/en/docs/warnings/v832/ for details
2021-06-24 00:26:15 +02:00
Andrei Kortunov
e309f75938
Join variables declaration and usage
2021-04-14 08:07:56 +04:00
AnyOldName3
8ff4f731fb
Make Coverity happy about A2C
...
Initialise member variable
2021-04-09 23:08:51 +00:00
Andrei Kortunov
cf52bee188
Fix build with OSG 3.4
2021-03-24 16:32:15 +04:00
Alexei Dobrohotov
2fdbe9b3f6
Handle BSShader[PP/No]LightingProperty
2021-03-22 01:55:58 +03:00
AnyOldName3
0431ba4c87
Merge branch 'alpha-meddling-shader-side-mip-meddling' into alpha-meddling
2021-03-13 01:23:30 +00:00
AnyOldName3
9be258d260
Make it possible to reinstate FFP state easily
2021-02-19 19:59:48 +00:00
AnyOldName3
4f510d85ba
Merge remote-tracking branch 'upstream/master' into alpha-meddling
2021-02-14 22:42:55 +00:00
AnyOldName3
b6e92c9c6d
Use ShaderVisitor to skip translucent framebuffer specific stuff
2021-01-20 23:37:19 +00:00
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.
2021-01-07 18:13:51 +00:00
AnyOldName3
e3fd5efcfe
Disable A2C for alpha-blended drawables
2021-01-02 19:09:06 +00:00
AnyOldName3
8f4b856b44
Initial A2C implementation
2020-12-26 22:45:53 +00:00
AnyOldName3
8c3a786e54
Unconditionally disable alpha testing when shaders are used
2020-12-24 00:32:15 +00:00
AnyOldName3
ce2bcba5d4
Replace deprecated alpha test in shader visitor
2020-12-17 14:57:43 +00:00
AnyOldName3
48f397f168
Remove existing shader when no longer required
2020-12-03 21:06:02 +00:00
AnyOldName3
1e0df23d14
Merge branch 'shadows-bin' into 'master'
...
Use a custom renderbin to avoid pointless OpenGL state switches
See merge request OpenMW/openmw!402
2020-11-13 16:29:41 +00:00
AnyOldName3
72f7e6a702
Handle all shadow alpha uniforms in shadowsbin
2020-11-12 00:26:30 +00:00
Alexei Dobrohotov
b523574090
Remove shader visitor settings manager dependency
2020-11-09 13:59:59 +03:00
Andrei Kortunov
065ed5138e
Use emplace_back instead of push_back
2020-10-18 10:27:35 +04:00
Capostrophic
c0b322b264
Improve color mode handling in shaders
2020-05-09 16:15:10 +03:00
AnyOldName3
a3b032bf2b
Fix chameleon shadows
2020-04-27 23:49:48 +01:00
AnyOldName3
53b9b41159
Rely on existing alpha test for non-blended shadow casting
2020-04-21 18:18:55 +01: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
Capostrophic
5770227e37
Avoid using auto-detected normal maps that are bump map namesakes
2020-03-05 13:19:34 +03:00
Capostrophic
624a9ac353
Force shaders for objects affected by new envmap option
2020-03-04 14:06:22 +03:00
Capostrophic
19a7245251
Add bump mapping support
2020-03-03 13:32:30 +03:00
Andrei Kortunov
1cdd33b434
Implement additional stringops to avoid Boost functions
2020-01-09 19:40:22 +04:00
bzzt
ffe8bbd2dd
racingcrashfix #4766
2019-05-29 13:37:00 +00:00
Capostrophic
0cdc46dfd6
Move forcePPL and clamp to global shader defines (bug #4869 )
2019-03-05 23:36:08 +03:00
Andrei Kortunov
3032b177a1
Remove redundant includes
2019-02-23 08:02:12 +04:00
AnyOldName3
244bd289cb
Change default colour mode (as apparently it actually gets used sometimes)
2018-12-03 18:56:37 +00:00
AnyOldName3
a41ce42208
Move setting of colorMode to ShaderRequirements in case they're reused
2018-10-18 16:00:51 +01:00
AnyOldName3
474770eca8
Switch shadow map rendering to a specialised, simplified shader.
2018-10-16 21:23:31 +01:00
AnyOldName3
ce15369bbd
Convert colorMode shader define to a uniform
2018-10-15 23:12:15 +01:00
Andrei Kortunov
e06f0b797a
Replace all NULLs to nullptr
2018-10-09 10:21:12 +04:00
Andrei Kortunov
1452684d9e
Use new logging system for components
2018-08-14 19:42:41 +04:00
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.
2017-09-01 21:42:36 +00:00
scrawl
f1ebb129c1
Fix ShaderVisitor to deal with the fact RigGeometry no longer derives from Geometry
2017-09-01 21:42:35 +00:00
scrawl
b9931fb71c
Set the shader on the node containing the StateSet
2017-08-31 21:39:21 +00:00
Bret Curtis
d48b829b45
replace and purge boost::lexical_cast
2017-06-09 19:08:53 +02:00
scrawl
d8505e4f48
Fix a multithreading crash caused by modification of live Geometry
2017-03-01 03:36:04 +01:00
scrawl
058681ad73
ShaderVisitor: avoid reset of rig geometry when not required
2017-03-01 03:00:08 +01:00
scrawl
67e4a7e37b
Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead
2017-02-09 04:51:20 +01:00
scrawl
792f505b2a
Fix potential crash in ShaderVisitor for textures with no image assigned
2017-02-08 19:16:07 +01:00
scrawl
45ae8d5ffa
Add support for GL_AMBIENT colorMode to shaders as required by particle systems
2017-02-08 18:39:24 +01:00
scrawl
a5da3a269e
Fix shadowing warnings
2016-08-29 12:20:00 +02:00
scrawl
d1f6169889
Add special handling of RigGeometry tangents in ShaderVisitor
2016-03-23 16:48:41 +01:00
scrawl
6f31b3d79f
Add parallax mapping for objects
2016-03-22 21:46:15 +01:00
scrawl
df6fd5f206
Recognize normalHeightMap in the ShaderVisitor
2016-03-22 21:46:15 +01:00
scrawl
6e7c6fdd7e
Implement NiTexturingProperty::DecalTexture
2016-03-01 18:41:36 +01:00
scrawl
062410bd8c
Don't incorrectly remove TexEnv state
2016-02-23 10:56:18 +01:00
scrawl
90a99991d1
Use empty() instead of !size()
2016-02-22 19:06:12 +01:00
scrawl
e25e0a0600
ShaderVisitor: assume the first texture unit is the diffuseMap
2016-02-20 23:47:32 +01:00
scrawl
4ca6e91292
Fix in-code default settings so that we don't attempt to use shaders in OpenCS
2016-02-20 20:36:29 +01:00
scrawl
8f81df2bd3
Cleanup
2016-02-20 20:34:56 +01:00
scrawl
f01e8a6950
Add specular mapping for objects
2016-02-20 19:55:08 +01:00
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'
2016-02-20 18:00:43 +01:00
scrawl
5e12a1b4ef
Add enchanted item glow to the shader
2016-02-18 23:05:44 +01:00
scrawl
268594dcf1
Recreate shader in NpcAnimation::setAlpha
2016-02-18 22:48:53 +01:00
scrawl
a73512afb7
Add shader settings to settings.cfg
2016-02-18 19:38:34 +01:00
scrawl
22cc5c0965
Cache the Program
2016-02-18 19:37:58 +01:00
scrawl
456816f707
Use diffuse.a / vertex.a, use material emission
2016-02-18 19:37:58 +01:00
scrawl
9376811213
Vertex lighting shader
2016-02-18 19:37:57 +01:00
scrawl
a9ad1b09e2
Introduce ShaderManager & ShaderVisitor
...
Actual shaders still to be written.
2016-02-18 19:37:56 +01:00