Fixed updating of lights.
This commit is contained in:
parent
9e987fdbdf
commit
18bd1bda49
@ -204,9 +204,11 @@ void Graphics::updateClosestLights() {
|
||||
std::sort(closestLights.begin(),
|
||||
closestLights.end(),
|
||||
[this](Light a, Light b) {return compareLightDistances(a, b); });
|
||||
if (level->getLights()->size() > 32) {
|
||||
closestLights = std::vector<Light>(&closestLights[0],
|
||||
&closestLights[31]);
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::updateShaderLights() {
|
||||
updateClosestLights();
|
||||
|
Loading…
Reference in New Issue
Block a user