1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Actually normalize the sun position exposed to post-processing

This commit is contained in:
Alexei Kotov 2024-01-28 05:38:12 +03:00
parent 093d86353f
commit 422e455157

View File

@ -43,6 +43,7 @@ namespace fx
void setSunPos(const osg::Vec4f& pos, bool night)
{
mData.get<SunPos>() = pos;
mData.get<SunPos>().normalize();
if (night)
mData.get<SunPos>().z() *= -1.f;