Fixed popping of directional shadows.

This commit is contained in:
Faerbit 2015-02-28 15:53:12 +01:00
parent e6251f8cba
commit 81d2de5344

View File

@ -170,7 +170,7 @@ void Graphics::render(double time)
projection_size = farPlane/1.5f; projection_size = farPlane/1.5f;
break; break;
} }
depthViewProjectionMatrices.at(i) = glm::ortho<float>(-projection_size, projection_size, -projection_size, projection_size, -farPlane/1.5f, projection_size) * depthViewProjectionMatrices.at(i) = glm::ortho<float>(-projection_size, projection_size, -projection_size, projection_size, -farPlane/1.5f, farPlane/1.5f) *
glm::lookAt(sunVector, level->getCameraCenter()->getPosition(), glm::vec3(0,1,0)); glm::lookAt(sunVector, level->getCameraCenter()->getPosition(), glm::vec3(0,1,0));
level->render(depthShader, false, &depthViewProjectionMatrices.at(i)); level->render(depthShader, false, &depthViewProjectionMatrices.at(i));
if (!framebuffer_directional.at(i)->isFrameBufferObjectComplete()) { if (!framebuffer_directional.at(i)->isFrameBufferObjectComplete()) {