summaryrefslogtreecommitdiffstats
path: root/src/render/renderers/opengl/renderer/renderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderers/opengl/renderer/renderview.cpp')
-rw-r--r--src/render/renderers/opengl/renderer/renderview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/renderers/opengl/renderer/renderview.cpp b/src/render/renderers/opengl/renderer/renderview.cpp
index 117aca3c7..dd394b5f7 100644
--- a/src/render/renderers/opengl/renderer/renderview.cpp
+++ b/src/render/renderers/opengl/renderer/renderview.cpp
@@ -1036,7 +1036,8 @@ void RenderView::setShaderAndUniforms(RenderCommand *command,
if (lightIdx == MAX_LIGHTS)
break;
Entity *lightEntity = lightSource.entity;
- const Vector3D worldPos = lightEntity->worldBoundingVolume()->center();
+ const Matrix4x4 lightWorldTransform = *(lightEntity->worldTransform());
+ const Vector3D worldPos = lightWorldTransform * Vector3D(0.0f, 0.0f, 0.0f);
for (Light *light : lightSource.lights) {
if (!light->isEnabled())
continue;