summaryrefslogtreecommitdiff
path: root/application/main.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-18 09:04:25 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-18 09:04:25 +0000
commitc0a0827a29536349f58e21023daf2963fb9247e6 (patch)
tree84748ccbb46eaad78da5bd8814a671f51fe88653 /application/main.cpp
parentAllow setting any uniform in shaders (diff)
downloadilt-c0a0827a29536349f58e21023daf2963fb9247e6.tar.bz2
ilt-c0a0827a29536349f58e21023daf2963fb9247e6.tar.xz
ilt-c0a0827a29536349f58e21023daf2963fb9247e6.zip
Add support for directional light color and an ambient color
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/application/main.cpp b/application/main.cpp
index 7e23a16..bf40f1c 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -85,6 +85,8 @@ public:
camera.RotateY(0.7854);
shader.setView(camera.GetViewProjection());
shader.setUniform("lightDirection", glm::normalize(glm::vec3 {1, -1, 0}));
+ shader.setUniform("lightColor", {.6, .6, .6});
+ shader.setUniform("ambientColor", {0.5, 0.5, 0.5});
auto t_start = std::chrono::high_resolution_clock::now();
const auto framelen = std::chrono::milliseconds {1000} / 120;