Commit Graph

145 Commits

Author SHA1 Message Date
Bo Svensson 4b1c009ffd
use StateSet define for translucentFramebuffer (#3138)
With this PR we test out osg's shader define system for a somewhat harmless feature. As we can see, our code becomes more concise and efficient in this case. Most importantly, we no longer create unneeded vertex shader objects.
2021-10-05 14:37:08 +02:00
Bo Svensson b2af81bc18
converts remaining osg::NodeCallback (#3147)
With this PR we convert remaining instantiations of the deprecated osg::NodeCallback in Open MW to SceneUtil::NodeCallback.
2021-10-05 14:21:12 +02:00
Bo Svensson 8358418555
set the correct program link parameters (#3110)
* shadermanager.hpp setProgramTemplate

* shadermanager.hpp

* shadermanager.cpp setProgramTemplate

* shadervisitor.hpp setProgramTemplate

* shadervisitor.cpp setProgramTemplate

* scenemanager.cpp setProgramTemplate

* scenemanager.hpp setProgramTemplate

* renderingmanager.cpp

* groundcover.cpp setProgramTemplate

* groundcover.hpp

* groundcover.cpp

* shadervisitor.cpp

* util.cpp

* lightmanager.cpp

* scenemanager.cpp

* scenemanager.hpp

* lightmanager.cpp

* lightmanager.cpp

* lightmanager.cpp

* scenemanager.hpp [ci skip]

* water.cpp

* groundcover.cpp

* shadermanager.hpp
2021-09-29 15:40:37 +02:00
Bo Svensson e41fe7573a
avoids creating empty statesets for collada nodes (#3128)
* avoids creating empty statesets for collada nodes

With this PR we avoid creating empty statesets for collada nodes which will be detrimental to osg's draw performance.

* scenemanager.cpp
2021-09-28 10:17:12 +02:00
Bo Svensson 5fde6867a2
removes unused code (#3129)
* scenemanager.cpp

* scenemanager.hpp

* scenemanager.cpp

* stats.cpp

* renderingmanager.cpp
2021-09-28 09:07:49 +02:00
Bo Svensson c6f7137ee1
fixes bugs with share state (#3111)
* optimizer.cpp merge fix

* objectpaging.cpp

* optimizer.hpp setSharedStateManager

* optimizer.cpp shareState

* scenemanager.cpp shareState

* scenemanager.cpp

* optimizer.cpp

* optimizer.cpp

* scenemanager.cpp

* optimizer.cpp
2021-09-27 20:41:24 +02:00
unelsson 67894349a9 Add a check for OPAQUE_BIN 2021-09-19 22:38:07 +03:00
unelsson f2a894024a Change debug levels 2021-09-19 22:38:07 +03:00
unelsson ec0b36d21d Don't make a new osg::depth to alpha tested node 2021-09-19 22:38:07 +03:00
unelsson 96f02ab32c Per-material alpha testing for collada 2021-09-19 22:38:07 +03:00
unelsson 40497d6fe5 Set depth testing for alpha blend & test, depth writes off for blend. 2021-09-19 22:38:07 +03:00
unelsson b3d1d106af Collada alpha testing and uniforms 2021-09-19 22:38:07 +03:00
Cédric Mocquillon 6817282097 Move getFileExtension to common header and use instead of repeating same code 2021-09-14 18:09:55 +02:00
Cédric Mocquillon c2df0949e2 Change normalizeFilename signature 2021-09-14 18:09:55 +02:00
jvoisin b01ef2629c Fix two Wreorder clang warnings 2021-08-13 13:59:57 +02:00
jvoisin 586d8684d0 Fix two coverity issues about uninitialised variables 2021-08-09 12:43:30 +02:00
glassmancody.info 09e03fde2e refactor and fix wobbly shores 2021-08-04 17:49:57 -07:00
glassmancody.info cad0b151cb enable shaders path and dehardcode depth formats 2021-08-04 17:39:11 -07:00
glassmancody.info 70fac33940 initial reverse-z depth implementation 2021-08-04 17:39:11 -07:00
CedricMocquillon d11a6bd92c Share state 2021-05-18 17:57:47 +02:00
psi29a d843ec321e Merge branch 'DoNotSearchTwice' into 'master'
Search only in the niffilemanager for nif files

See merge request OpenMW/openmw!823
2021-05-13 17:11:57 +00:00
Thunderforge 339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
2021-05-10 22:44:07 -05:00
CedricMocquillon a885134868 Do not search if it is not used 2021-05-06 13:28:06 +02:00
CedricMocquillon 813b8ee0d1 Search only in the niffilemanager for nif files 2021-05-05 23:19:08 +02:00
glassmancody.info 16856d45c5 Lighting Patch
Fixes build errors with older OSG builds and some issues with 'shared' layout.
Bring back ambient in inventory through lightmodel instead of sun ambient, mirrors scene ambient/sunlight relationship.
Forces shaders when certain lighting methods are enabled and finalize settings.
Correctly override sun for localmap.
2021-04-16 11:55:40 -07:00
glassmancody.info 582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:52 -07:00
glassmancody.info 7370acdf54 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:19 -07:00
glassmancody.info 43ac32921c Rewrite, support different lighting methods 2021-04-13 11:09:19 -07:00
glassmancody.info 9d9074c244 Add shared UBO 2021-04-13 11:07:48 -07:00
glassmancody.info dda735c54a initial commit 2021-04-13 11:06:16 -07:00
Andrei Kortunov 124a33d8a3 Fix uninitialized variables 2021-04-10 10:58:00 +04:00
Alexei Dobrohotov 2fdbe9b3f6 Handle BSShader[PP/No]LightingProperty 2021-03-22 01:55:58 +03: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
Nelsson Huotari 45fde84f4f Use nodemasks and visitors for detecting custom collision shapes 2021-02-03 21:16:54 +02:00
Nelsson Huotari 5c32460153 Add underscore-separated node-names to reserved-list 2021-02-03 14:25:50 +02:00
Nelsson Huotari 5b88d16a50 Clean-up 2021-02-02 21:09:50 +02:00
Nelsson Huotari 3194520dcd Move base_anim settings to settings-default.cfg 2021-01-27 13:41:02 +02:00
Andrei Kortunov 24e1dfcddc Use default argument 2021-01-26 22:29:41 +04:00
Andrei Kortunov 14cf0ce1dc Implement instanced groundcover 2021-01-26 22:29:41 +04:00
AnyOldName3 b6e92c9c6d Use ShaderVisitor to skip translucent framebuffer specific stuff 2021-01-20 23:37:19 +00:00
Andrei Kortunov f175beb304 Define template ref classes in components 2021-01-13 14:25:21 +04:00
AnyOldName3 8f4b856b44 Initial A2C implementation 2020-12-26 22:45:53 +00:00
Nelsson Huotari 55dcc6582a Don't duplicate getFileExtension, use OpenMW's namespaces 2020-11-28 15:03:10 +02:00
Nelsson Huotari 6e77ad1f6a OSG-Collada animation support 2020-11-19 01:11:56 +02:00
Alexei Dobrohotov b523574090 Remove shader visitor settings manager dependency 2020-11-09 13:59:59 +03:00
Andrei Kortunov 660df19ff7 Allow to assign custom shaders to nodes 2020-10-25 18:22:16 +04:00
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
elsid 40ad87bc4d
Replace OpenThreads by std types 2020-06-25 22:16:09 +02:00
Nelsson Huotari 5bc44cf2ee Use sequenced texture units with .dae/collada 2020-06-16 14:37:06 +03:00