Fix bug with incorrect lighting for RenderableModels

This commit is contained in:
Emil Axelsson
2018-07-04 10:35:19 +02:00
parent ec89a5a4f9
commit 4fe4932d0e
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -217,7 +217,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) {
_sunPos - data.modelTransform.translation
);
const glm::vec3 directionToSunViewSpace =
glm::mat3(data.camera.combinedViewMatrix()) * directionToSun;
glm::normalize(glm::mat3(data.camera.combinedViewMatrix()) * directionToSun);
_programObject->setUniform(
_uniformCache.directionToSunViewSpace,