Commit Graph

127 Commits

Author SHA1 Message Date
AnyOldName3 e2e7b58b3a Handle normalHeightMap as special case 2025-04-20 23:55:38 +01:00
AnyOldName3 4707c7e2fc Format 2025-04-20 00:17:03 +01:00
AnyOldName3 115fc08904 Don't forget parallax when reapplying shader visitor
Fixes https://gitlab.com/OpenMW/openmw/-/issues/8341

I don't think this should go into 0.49 because there may be implications beyond what I've thought of and I'd rather we had a full dev cycle to notice any regressions.

The fix is a little janky, but makes use of some dead code we've had since the introduction of normal-height maps nearly a decade ago, so it's a safe bet that it was never intended to be dead code.
The main effect of the jankiness is that we'll add some pointless @defines for normalHeightMap that none of our shaders use and which will always be zero.
2025-04-20 00:12:53 +01:00
AnyOldName3 6330d80b9e Don't expect TangentSpaceGenerator to work without texcoords 2024-10-24 13:36:49 +01:00
elsid 1fd6ac6438
Use normalized path in ImageManager 2024-09-17 00:49:57 +02:00
Alexei Kotov 908f3891fb Add helper method for texture type recovery 2024-05-19 02:26:40 +03:00
Alexei Kotov 84f4ba4ca1 Support defining the texture type with a state attribute (#6240)
Named textures are still supported for easier native format compatibility (and so that I don't have to edit the documentation)
2024-05-18 23:11:20 +03:00
Alexei Kotov 443e341ae7 Generalize unsized pixel format computation 2024-04-16 02:52:25 +03:00
Alexei Kotov 3c0c1717a9 Fix red-green normal map handling for terrain 2024-04-15 12:02:52 +03:00
Alexei Kotov 58afe1ba23 Support red-green normal maps 2024-04-15 12:02:52 +03:00
AnyOldName3 36a75cdb29 Get the GLExtensions instance when a context is created 2024-02-23 00:15:23 +00:00
Andrei Kortunov 251d01304f Use move semantics for osg::ref_ptr 2024-01-21 13:48:33 +04:00
Alexei Kotov 4a96885323 Untangle normals and parallax handling
Move tangent space generation to the vertex shaders
Support diffuse parallax when no normal map is present
Don't use diffuse parallax if there's no diffuse map
Generalize normal-to-view conversion
Rewrite parallax
2023-12-12 22:42:53 +03:00
Alexei Kotov 9c94058727 Support Oblivion parallax setup 2023-11-27 03:41:51 +03:00
elsid 08902371b4
Use settings values for Shaders settings 2023-10-12 20:43:53 +02:00
Petr Mikheev a401461a64 Update addedState in shadervisitor.cpp 2023-09-27 21:19:59 +02:00
Petr Mikheev 63d5bd6f8a Apply soft effect to nifs marked with soft effect flag (developed by Cody Glassman) 2023-09-27 20:41:52 +02:00
Andrei Kortunov a08d921c4c Create a stateset for every particle system to create its own defineMap 2023-06-21 16:13:58 +04:00
Mads Buvik Sandvei fe066069d7 /components/ code should not access the stereo manager without checking whether or not stereo is enabled first. Stereo component code should not read settings itself, but rather take settings as parameters. 2023-04-22 16:11:42 +02:00
AnyOldName3 ccdb1bf6b7 Ensure shader requirements are pushed at least once for subgraph
Shaders, if deemed necessary, get attached to the node mentioned by the
top of the requirements stack. Previously an empty stack was incorrectly
assumed to mean no shaders were required, but we found out that was
wrong. We need to put shaders *somewhere*, and the root of the subgraph
we're modifying should be the best place.
2023-03-08 00:28:48 +00:00
AnyOldName3 aee1edaf9e Partially revert "Attach shaders to geometry that lacks a stateset if necessary"
This reverts commit 6aef366fd3.
2023-03-08 00:15:49 +00:00
AnyOldName3 4aa40897ca Revert "Apply ShaderVisitor to Rig/MorphGeometry source geometry"
This reverts commit 471f6abf6c.

The commit should be redundant as of 20e799dadc
2023-03-06 00:54:57 +00:00
Alexei Dobrohotov 471f6abf6c Apply ShaderVisitor to Rig/MorphGeometry source geometry 2023-03-01 18:27:44 +03:00
Alexei Dobrohotov 6aef366fd3 Attach shaders to geometry that lacks a stateset if necessary 2023-02-28 20:13:16 +03:00
Cody Glassman ac4787aeec shade refactor 2023-02-25 11:03:39 -08:00
glassmancody.info 9a4977d334 rain occlusion 2023-01-06 22:23:03 -08:00
AnyOldName3 66b8d4fb29 Add a setting to control coverage adjustment
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.

With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.

It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2022-12-09 00:22:08 +00:00
jvoisin 3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
clang-format-bot ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
glassmancody.info 651916694c use correct indexed color mask 2022-08-01 07:56:16 -07:00
glassmancody.info 7bed2208e9 only force ppl on particles with normal maps 2022-07-04 18:28:29 -07:00
psi29a 56187ad977 Merge branch 'soften_me_up_like_one_of_your_french_meshes' into 'master'
Allow soft particle effect on any NIF

See merge request OpenMW/openmw!2015
2022-06-30 13:46:22 +00:00
glassmancody.info b09411d396 allow soft particles on meshes and add extra data extensions 2022-06-29 18:15:12 -07:00
Petr Mikheev d0deb37f5c Fix several issues with sky blending 2022-06-27 21:51:41 +02:00
psi29a feef257584 Merge branch 'postprocessor-stereo' into 'master'
[Postprocessing] Stereo integration

See merge request OpenMW/openmw!1988
2022-06-21 15:55:06 +00:00
Mads Buvik Sandvei b0e4c7e76a [Postprocessing] Stereo integration 2022-06-21 15:55:06 +00:00
Nelsson Huotari 334c6dde0b custom class for osgAnimation::RigGeometry, Collada animated deforming body parts 2022-06-21 15:27:34 +00:00
jvoisin 02cafc3b98 And one more 2022-05-21 22:08:20 +02:00
cody glassman 04843fed6d moddable post-processing pipeline 2022-05-15 10:03:58 -07:00
madsbuvi dd5901d351 Initial commit
Multiview shaders.

Refactor Frustum management

Rewrite shared shadow map

cull mask should respect stereo

Stereo savegame screencap

LocalMap refactoring

use the vertex buffer hint instead of the display list patch to enable/disable display lists

Character preview fixes
2022-04-28 21:05:34 +02:00
Alexei Dobrohotov dd473d06df Implement gloss-mapping (feature #6541) 2022-02-18 06:24:06 +03:00
AnyOldName3 14a330609f ShaderVisitor improvements
* Adds comments explaining the less-than-obvious aspects.
* Adds comments explaining what to do when adding new stuff.
* Some fixes caused by those comments not historically existing.
* Add a TODO comment to something which may catch fire in the future.
2021-12-29 13:45:42 -08:00
glassmancody.info 9389cfaa42 mac os driver workaround and shadervisitor fixes 2021-11-20 18:39:20 -08:00
Cody Glassman d85f772269 Depth refactor 2021-11-21 02:25:05 +00:00
glassmancody.info 4461366761 settings update and launcher option 2021-11-01 09:26:50 -07:00
glassmancody.info 40b6bbbdf3 use openmw define system 2021-10-30 12:19:31 -07:00
glassmancody.info 8c3b00164e soft particles 2021-10-30 12:19:31 -07:00
glassmancody.info 07e32c0fa6 remove object shader path 2021-10-25 10:23:16 -07:00
glassmancody.info 1e40d27318 introduce sky shaders 2021-10-23 17:53:38 -07:00