summary refs log tree commit diff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-23 02:48:51 +0200
committerMel <einebeere@gmail.com>2022-10-23 02:48:51 +0200
commit75a9c87b50cef2f1d749bd9042a9348bc28b4c09 (patch)
tree8d82f3cbbb5bdc63c7e5b6431dac3d49b23a478d /src/main.cpp
parent589bfb5cad0052856077ce867f3858ca3741d95d (diff)
downloadmeowcraft-75a9c87b50cef2f1d749bd9042a9348bc28b4c09.tar.zst
meowcraft-75a9c87b50cef2f1d749bd9042a9348bc28b4c09.zip
Sun lighting
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5d5af2f..40034e2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -66,10 +66,15 @@ void run() {
     auto view_uniform = program.uniform("view_matrix");
     auto projection_uniform = program.uniform("projection_matrix");
 
+    auto sun_direction_uniform = program.uniform("sun_direction");
+
     program.bind();
     auto projection = Math::MVP::projection(ASPECT, FOV, 0.1f, 1000.0f);
     projection_uniform.set(projection);
 
+    Vector<3> sun_direction{1.0f, -1.0f, 0.0f};
+    sun_direction_uniform.set(sun_direction);
+
     glEnable(GL_DEPTH_TEST);
     glDepthFunc(GL_LEQUAL);