diff --git a/src/kekengine/cpp/common/engine.cpp b/src/kekengine/cpp/common/engine.cpp index 97b939c..366d0f0 100644 --- a/src/kekengine/cpp/common/engine.cpp +++ b/src/kekengine/cpp/common/engine.cpp @@ -221,6 +221,11 @@ int start() { } } + while(shaderLights.size() > KEK_LIGHT_LIMIT) { + // TODO: remove furthest lights instead + shaderLights.pop_back(); + } + unsigned int i = 0; int numPointLights = 0, numDirectionalLights = 0, numSpotLights = 0;