public static void setMaxLightCount(Light.Type lightType, int count) { DefaultShader.Config config = shaderProvider.config; if (lightType.equals(Light.Type.POINT)) config.numPointLights = count; else if (lightType.equals(Light.Type.SUN)) config.numDirectionalLights = count; else config.numSpotLights = count; shaderProvider .deleteShaders(); // Get rid of the old shaders, as they need to be recreated for the new // light count. }
public static int getMaxLightCount(Light.Type lightType) { DefaultShader.Config config = shaderProvider.config; if (lightType.equals(Light.Type.POINT)) return config.numPointLights; else if (lightType.equals(Light.Type.SUN)) return config.numDirectionalLights; else return config.numSpotLights; }