Optimizing scheduling of shadow renders.

This commit is contained in:
Faerbit 2015-06-02 20:46:21 +02:00
parent 5f779ea3d5
commit a6876f0872

View File

@ -690,7 +690,7 @@ void Graphics::updateLights() {
// update priority of the shadow render queue
for(unsigned int i = 0; i<shadowRenderQueue.size(); i++) {
float distance = glm::distance(level->getCameraCenter()->getPosition(), shadowRenderQueue.at(i).light->getPosition());
shadowRenderQueue.at(i).priority = (int) 100*std::exp(5.0f - 0.1f * distance);
shadowRenderQueue.at(i).priority = (int) 100*std::exp(5.0f - 0.05f * distance);
}
// Build light position array