31 Commits
Author SHA1 Message Date
Alexei Kotov 3be27b59bf Address review
Document some non-obvious UV shenanigans and remove a misleading hyphen
2026-02-05 22:03:43 +03:00
Alexei Kotov a357dcc1b1 Change the texture asset convention to top-left (#6885)
This is basically a MR description but this commit covers a lot of things so I'll include it so you don't have to look at the MR:

This allows us to use BC6H and BC7 textures as is, provided the used OSG revision and hardware support them
DDS images are unflipped by default, non-DDS bottom-left convention images are flipped (TGA, BMP, PNG, JPG)
3D DDS images always used top-left convention if they were used in post-processing

Numerous things flipped in this commit to guarantee the same visual results are:
- Terrain UV and blend maps
- Water UV, normal map and simple water ripple alignment

- NiTriShapeData and BSTriShape UV (unflipped), NiUVController vertical offset
- NIF particles are NOT flipped, they remain flipped for Morrowind compatibility

- GUI widget texture UV and convention
- Cursor
- Character preview inventory doll and race menu head UV and display
- Loading screen scene image UV
- Local and global map UVs (fog of war, unexplored and explored maps)
- Saved game screenshot UV
- Video widget UV

- Rain particle alignment
- Sun and moon UV

- Tangent space handedness (bitangent direction)
- Parallax vertical offset

Things where this is a breaking change
- Collada geometry UV (Example Suite and anything else affected must adopt the changes)
- Compressed non-S3TC images that should but can't be flipped (this is KTX which we don't technically support yet)
- Any forward pass shader replacements that currently still use the original tangent space handedness and parallax convention
2026-02-05 21:05:35 +03:00
elsid 1fd6ac6438 Use normalized path in ImageManager 2024-09-17 00:49:57 +02:00
Alexei Kotov 58afe1ba23 Support red-green normal maps 2024-04-15 12:02:52 +03:00
elsid 215404e126 Report more stats from caches 2024-03-29 14:25:39 +01:00
AnyOldName3 02ef7ae3cc Give up rearranging the CS 2024-02-25 22:49:53 +00:00
AnyOldName3andAnyOldName3 36a75cdb29 Get the GLExtensions instance when a context is created 2024-02-23 00:15:23 +00:00
elsid 053a3caf7b Pass cache expiry delay to GenericResourceManager constructor 2023-09-09 19:35:20 +02:00
Evil Eye eeda48ec50 Drop support for --fs-strict 2023-06-08 21:10:09 +02:00
Evil Eye 5491512905 Use string_view in more places and reduce the number of empty string literals 2023-05-21 16:39:32 +02:00
clang-format-botandζeh Matt ddb0522bbf Apply clang-format to code base 2022-09-22 21:35:26 +03:00
cody glassman ac6089a430 skip flipping of 3D textures which is unsupported in OSG 2022-05-15 10:03:58 -07: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 33e035cc95 Fix two excessive type casting instances
No need to to a string -> char* -> string dance.
2021-06-23 22:19:08 +02:00
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
AnyOldName3 85b5fdee35 Discard the alpha channel of 16-bit TGAs, just like Morrowind 2020-09-12 00:20:44 +01:00
Capostrophic 16f6c7b27f Use the new option to treat TGA files as TGA 1.0 2020-04-30 09:57:58 +03:00
Andrei Kortunov 1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
scrawl 5fbdb64bb9 Add OPENMW_DECOMPRESS_TEXTURES environment variable to decompress textures in software if not supported by graphics hardware
Disabled by default due to requiring new functionality that was just added to OSG 3.6 or OpenMW/OSG.
2017-10-14 18:28:46 +00:00
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
scrawl 051c17a184 Make reportStats const 2017-03-14 19:27:55 +01:00
scrawl 8f79fa3d72 Add resource statistics panel opened with F4 2017-02-22 14:28:45 +01:00
scrawl 5c94e2324f Add missing use plugin macro for static build 2016-10-08 19:20:44 +02: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 5824619a95 Clean up includes 2016-02-12 19:28:10 +01:00
scrawl 8b596dfcbe Remove support for OSG 3.2
Since commit e8662bea31, we're using OSG functionality that contains an unfixed crash bug in version 3.2. The bug is fixed in version 3.4 (OSG commit 6351e5020371b0b72b300088a5c6772f58379b84)
2016-02-12 14:46:45 +01:00
scrawl df57d4bfba Use a common base class for resource managers
Implement updateCache to delete unreferenced cached objects when they have not been referenced for a while.
2016-02-06 17:22:17 +01:00
scrawl 6c1c653cba Use the osgDB::ObjectCache in ImageManager
Should be thread safe now.
2016-02-05 23:31:59 +01:00
scrawl 5ee3d1698f Remove getWarningTexture in favor of getWarningImage 2016-02-05 23:05:43 +01:00
scrawl f99f403dda Rename TextureManager to ImageManager 2016-02-05 23:03:53 +01:00