mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
properly update postprocess uniform for sun position in interiors
This commit is contained in:
parent
a24fa3ea51
commit
6b6c732a59
1 changed files with 5 additions and 3 deletions
|
@ -771,9 +771,11 @@ namespace MWRender
|
|||
setAmbientColour(ambient);
|
||||
|
||||
osg::Vec4f diffuse = SceneUtil::colourFromRGB(cell->mAmbi.mSunlight);
|
||||
mSunLight->setDiffuse(diffuse);
|
||||
mSunLight->setSpecular(diffuse);
|
||||
mSunLight->setPosition(osg::Vec4f(-0.15f, 0.15f, 1.f, 0.f));
|
||||
setSunColour(diffuse, diffuse, 1.f);
|
||||
|
||||
const osg::Vec4f interiorSunPos = osg::Vec4f(-0.15f, 0.15f, 1.f, 0.f);
|
||||
mPostProcessor->getStateUpdater()->setSunPos(interiorSunPos, false);
|
||||
mSunLight->setPosition(interiorSunPos);
|
||||
}
|
||||
|
||||
void RenderingManager::setSunColour(const osg::Vec4f& diffuse, const osg::Vec4f& specular, float sunVis)
|
||||
|
|
Loading…
Reference in a new issue