mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 14:36:39 +00:00
Merge branch 'update_sun' into 'master'
[Postprocessing] Update sun uniforms when loading interiors See merge request OpenMW/openmw!2574
This commit is contained in:
commit
ce51a0a2ad
1 changed files with 5 additions and 3 deletions
|
@ -771,9 +771,11 @@ namespace MWRender
|
||||||
setAmbientColour(ambient);
|
setAmbientColour(ambient);
|
||||||
|
|
||||||
osg::Vec4f diffuse = SceneUtil::colourFromRGB(cell->mAmbi.mSunlight);
|
osg::Vec4f diffuse = SceneUtil::colourFromRGB(cell->mAmbi.mSunlight);
|
||||||
mSunLight->setDiffuse(diffuse);
|
setSunColour(diffuse, diffuse, 1.f);
|
||||||
mSunLight->setSpecular(diffuse);
|
|
||||||
mSunLight->setPosition(osg::Vec4f(-0.15f, 0.15f, 1.f, 0.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)
|
void RenderingManager::setSunColour(const osg::Vec4f& diffuse, const osg::Vec4f& specular, float sunVis)
|
||||||
|
|
Loading…
Reference in a new issue