mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
properly update postprocess uniform for sun position in interiors
This commit is contained in:
parent
a24fa3ea51
commit
6b6c732a59
@ -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…
x
Reference in New Issue
Block a user