1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-24 18:41:34 +00:00

Merge branch 'regressionfixesofdubiousauthenticity' into 'master'

Rendering regression fixes of dubious authenticity (#7587, #7720)

Closes #7587 and #7720

See merge request OpenMW/openmw!3979
This commit is contained in:
psi29a 2024-03-26 09:04:41 +00:00
commit c8560c63eb
3 changed files with 9 additions and 5 deletions

View file

@ -111,6 +111,7 @@
Bug #7557: Terrain::ChunkManager::createChunk is called twice for the same position, lod on initial loading Bug #7557: Terrain::ChunkManager::createChunk is called twice for the same position, lod on initial loading
Bug #7573: Drain Fatigue can't bring fatigue below zero by default Bug #7573: Drain Fatigue can't bring fatigue below zero by default
Bug #7585: Difference in interior lighting between OpenMW with legacy lighting method enabled and vanilla Morrowind Bug #7585: Difference in interior lighting between OpenMW with legacy lighting method enabled and vanilla Morrowind
Bug #7587: Quick load related crash
Bug #7603: Scripts menu size is not updated properly Bug #7603: Scripts menu size is not updated properly
Bug #7604: Goblins Grunt becomes idle once injured Bug #7604: Goblins Grunt becomes idle once injured
Bug #7609: ForceGreeting should not open dialogue for werewolves Bug #7609: ForceGreeting should not open dialogue for werewolves

View file

@ -346,7 +346,7 @@ namespace MWRender
for (auto& technique : mTechniques) for (auto& technique : mTechniques)
{ {
if (technique->getStatus() == fx::Technique::Status::File_Not_exists) if (!technique || technique->getStatus() == fx::Technique::Status::File_Not_exists)
continue; continue;
const auto lastWriteTime = std::filesystem::last_write_time(mTechniqueFileMap[technique->getName()]); const auto lastWriteTime = std::filesystem::last_write_time(mTechniqueFileMap[technique->getName()]);
@ -564,7 +564,7 @@ namespace MWRender
for (const auto& technique : mTechniques) for (const auto& technique : mTechniques)
{ {
if (!technique->isValid()) if (!technique || !technique->isValid())
continue; continue;
if (technique->getGLSLVersion() > mGLSLVersion) if (technique->getGLSLVersion() > mGLSLVersion)
@ -718,7 +718,7 @@ namespace MWRender
PostProcessor::Status PostProcessor::disableTechnique(std::shared_ptr<fx::Technique> technique, bool dirty) PostProcessor::Status PostProcessor::disableTechnique(std::shared_ptr<fx::Technique> technique, bool dirty)
{ {
if (technique->getLocked()) if (!technique || technique->getLocked())
return Status_Error; return Status_Error;
auto it = std::find(mTechniques.begin(), mTechniques.end(), technique); auto it = std::find(mTechniques.begin(), mTechniques.end(), technique);
@ -734,6 +734,9 @@ namespace MWRender
bool PostProcessor::isTechniqueEnabled(const std::shared_ptr<fx::Technique>& technique) const bool PostProcessor::isTechniqueEnabled(const std::shared_ptr<fx::Technique>& technique) const
{ {
if (!technique)
return false;
if (auto it = std::find(mTechniques.begin(), mTechniques.end(), technique); it == mTechniques.end()) if (auto it = std::find(mTechniques.begin(), mTechniques.end(), technique); it == mTechniques.end())
return false; return false;
@ -815,7 +818,7 @@ namespace MWRender
void PostProcessor::disableDynamicShaders() void PostProcessor::disableDynamicShaders()
{ {
for (auto& technique : mTechniques) for (auto& technique : mTechniques)
if (technique->getDynamic()) if (technique && technique->getDynamic())
disableTechnique(technique); disableTechnique(technique);
} }

View file

@ -243,7 +243,7 @@ namespace MWRender
osg::ref_ptr<osg::StateSet> stateset = quad->getOrCreateStateSet(); osg::ref_ptr<osg::StateSet> stateset = quad->getOrCreateStateSet();
Shader::ShaderManager& shaderMgr = mResourceSystem->getSceneManager()->getShaderManager(); Shader::ShaderManager& shaderMgr = mResourceSystem->getSceneManager()->getShaderManager();
stateset->setAttributeAndModes(shaderMgr.getProgram("360"), osg::StateAttribute::ON); stateset->setAttributeAndModes(shaderMgr.getProgram("s360"), osg::StateAttribute::ON);
stateset->addUniform(new osg::Uniform("cubeMap", 0)); stateset->addUniform(new osg::Uniform("cubeMap", 0));
stateset->addUniform(new osg::Uniform("mapping", static_cast<int>(screenshotMapping))); stateset->addUniform(new osg::Uniform("mapping", static_cast<int>(screenshotMapping)));