summaryrefslogtreecommitdiff
path: root/gfx/gl/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shader.cpp')
-rw-r--r--gfx/gl/shader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp
index 31feb80..7fcdefe 100644
--- a/gfx/gl/shader.cpp
+++ b/gfx/gl/shader.cpp
@@ -36,7 +36,8 @@ void
Shader::setView(glm::mat4 proj) const
{
glUniformMatrix4fv(viewProjection_uniform, 1, GL_FALSE, &proj[0][0]);
- glUniform3f(lightDir_uniform, 0.0F, -1.0F, 0.0F);
+ const glm::vec3 lightDir = glm::normalize(glm::vec3 {1, -1, 0});
+ glUniform3fv(lightDir_uniform, 1, &lightDir[0]);
}
void