Skip to content

Commit

Permalink
Merge branch 'sunlighting' into 'master'
Browse files Browse the repository at this point in the history
Fix interior sun direction (bug #7585)

Closes #7585

See merge request OpenMW/openmw!3699
  • Loading branch information
jvoisin committed Dec 31, 2023
2 parents db0d78b + abbbd8c commit 6180ad0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
Bug #7553: Faction reaction loading is incorrect
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 #7585: Difference in interior lighting between OpenMW with legacy lighting method enabled and vanilla Morrowind
Bug #7603: Scripts menu size is not updated properly
Bug #7604: Goblins Grunt becomes idle once injured
Bug #7609: ForceGreeting should not open dialogue for werewolves
Expand Down
5 changes: 3 additions & 2 deletions apps/openmw/mwrender/renderingmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,9 @@ namespace MWRender
osg::Vec4f diffuse = SceneUtil::colourFromRGB(cell.getMood().mDirectionalColor);

setSunColour(diffuse, diffuse, 1.f);

const osg::Vec4f interiorSunPos = osg::Vec4f(-0.15f, 0.15f, 1.f, 0.f);
// This is total nonsense but it's what Morrowind uses
static const osg::Vec4f interiorSunPos
= osg::Vec4f(-1.f, osg::DegreesToRadians(45.f), osg::DegreesToRadians(45.f), 0.f);
mPostProcessor->getStateUpdater()->setSunPos(interiorSunPos, false);
mSunLight->setPosition(interiorSunPos);
}
Expand Down

0 comments on commit 6180ad0

Please sign in to comment.