From 6c78c93c2b633d744f8fbb9d5e61aab5387f04bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=BCndgens?= Date: Fri, 27 Feb 2015 14:37:57 +0100 Subject: [PATCH] Increased size of directional light shadow map. --- graphics.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics.cc b/graphics.cc index ec2dcba..1ba6943 100644 --- a/graphics.cc +++ b/graphics.cc @@ -145,7 +145,7 @@ void Graphics::render(double time) framebuffer->bind(); glClear(GL_DEPTH_BUFFER_BIT); glm::vec3 sunVector = (level->getCameraCenter()->getPosition() + level->getDirectionalLight()->getPosition()); - glm::mat4 depthViewProjectionMatrix = glm::ortho(-farPlane/2.0f, farPlane/2.0f, -farPlane/2.0f, farPlane/2.0f, -farPlane/2.0f, farPlane/2.0f) * + glm::mat4 depthViewProjectionMatrix = glm::ortho(-farPlane/1.5f, farPlane/1.5f, -farPlane/1.5f, farPlane/1.5f, -farPlane/1.5f, farPlane/1.5f) * glm::lookAt(sunVector, level->getCameraCenter()->getPosition(), glm::vec3(0,1,0)); level->render(depthShader, false, &depthViewProjectionMatrix); if (!framebuffer->isFrameBufferObjectComplete()) {