diff --git a/CHANGELOG.md b/CHANGELOG.md index fab893258f..fdbc118c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -226,6 +226,7 @@ Bug #8231: AGOP doesn't like NiCollisionSwitch Bug #8237: Non-bipedal creatures should *not* use spellcast equip/unequip animations Bug #8252: Plugin dependencies are not required to be loaded + Bug #8295: Post-processing chain is case-sensitive Feature #1415: Infinite fall failsafe Feature #2566: Handle NAM9 records for manual cell references Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking diff --git a/apps/openmw/mwrender/postprocessor.cpp b/apps/openmw/mwrender/postprocessor.cpp index 8fdc0a45ca..4847da9cee 100644 --- a/apps/openmw/mwrender/postprocessor.cpp +++ b/apps/openmw/mwrender/postprocessor.cpp @@ -762,14 +762,18 @@ namespace MWRender if (Misc::StringUtils::ciEqual(technique->getName(), name)) return technique; + std::string realName = name; + auto fileIter = mTechniqueFileMap.find(name); + if (fileIter != mTechniqueFileMap.end()) + realName = fileIter->first; + auto technique = std::make_shared(*mVFS, *mRendering.getResourceSystem()->getImageManager(), - name, renderWidth(), renderHeight(), mUBO, mNormalsSupported); + std::move(realName), renderWidth(), renderHeight(), mUBO, mNormalsSupported); technique->compile(); if (technique->getStatus() != fx::Technique::Status::File_Not_exists) - technique->setLastModificationTime( - std::filesystem::last_write_time(mTechniqueFileMap[technique->getName()])); + technique->setLastModificationTime(std::filesystem::last_write_time(fileIter->second)); if (loadNextFrame) { diff --git a/apps/openmw/mwrender/postprocessor.hpp b/apps/openmw/mwrender/postprocessor.hpp index 2630467f95..af6eeae62b 100644 --- a/apps/openmw/mwrender/postprocessor.hpp +++ b/apps/openmw/mwrender/postprocessor.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "pingpongcanvas.hpp" #include "transparentpass.hpp" @@ -229,7 +230,8 @@ namespace MWRender TechniqueList mQueuedTemplates; TechniqueList mInternalTechniques; - std::unordered_map mTechniqueFileMap; + std::unordered_map + mTechniqueFileMap; RenderingManager& mRendering; osgViewer::Viewer* mViewer; diff --git a/components/fx/technique.cpp b/components/fx/technique.cpp index c99d30a1de..f56e0d498e 100644 --- a/components/fx/technique.cpp +++ b/components/fx/technique.cpp @@ -109,6 +109,14 @@ namespace fx { clear(); + if (std::ranges::count(mFilePath.value(), '/') > 1) + { + Log(Debug::Error) << "Could not load technique, invalid location '" << mFilePath << "'"; + + mStatus = Status::File_Not_exists; + return false; + } + if (!mVFS.exists(mFilePath)) { Log(Debug::Error) << "Could not load technique, file does not exist '" << mFilePath << "'";