diff options
Diffstat (limited to 'src/render/lights/qspotlight.cpp')
-rw-r--r-- | src/render/lights/qspotlight.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp index 54ed8da63..81c18387b 100644 --- a/src/render/lights/qspotlight.cpp +++ b/src/render/lights/qspotlight.cpp @@ -221,8 +221,9 @@ void QSpotLight::setLocalDirection(const QVector3D &direction) { Q_D(QSpotLight); if (localDirection() != direction) { - d->m_shaderData->setProperty("direction", direction); - emit localDirectionChanged(direction); + const QVector3D dir = direction.normalized(); + d->m_shaderData->setProperty("direction", dir); + emit localDirectionChanged(dir); } } |