mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 14:15:34 +00:00
Merge branch 'normalizedsun' into 'master'
Actually normalize the sun position exposed to post-processing See merge request OpenMW/openmw!3820
This commit is contained in:
commit
5ca8f7a00e
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ namespace fx
|
||||||
void setSunPos(const osg::Vec4f& pos, bool night)
|
void setSunPos(const osg::Vec4f& pos, bool night)
|
||||||
{
|
{
|
||||||
mData.get<SunPos>() = pos;
|
mData.get<SunPos>() = pos;
|
||||||
|
mData.get<SunPos>().normalize();
|
||||||
|
|
||||||
if (night)
|
if (night)
|
||||||
mData.get<SunPos>().z() *= -1.f;
|
mData.get<SunPos>().z() *= -1.f;
|
||||||
|
|
Loading…
Reference in a new issue