From ad567157c4e391059518f9058416c0ed3681ec2e Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 15 Dec 2014 13:16:27 +0100 Subject: [PATCH] MVPs are only needed for directional shadows and not for point light shadows. --- object.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/object.cc b/object.cc index 601fed0..9d1f339 100644 --- a/object.cc +++ b/object.cc @@ -25,8 +25,8 @@ void Object::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass, // set model matrix shader->setUniform( "modelMatrix", modelMatrix); // set shadowMVPs - glm::mat4 shadowMVPs[35]; - for(unsigned int i = 0; (isize() && i<35); i++) { + glm::mat4 shadowMVPs[5]; + for(unsigned int i = 0; (isize() && i<5); i++) { shadowMVPs[i] = shadowVPs->at(i) * modelMatrix; } glUniformMatrix4fv(shader->getUniformLocation("shadowMVPs"),