@Override
    public void render(RenderManager renderManager, Shader shader, Geometry geometry, LightList lights, BindUnits lastBindUnits) {
        int nbRenderedLights = 0;
        Renderer renderer = renderManager.getRenderer();
        int batchSize = renderManager.getSinglePassLightBatchSize();
        if (lights.size() == 0) {
            updateLightListUniforms(shader, geometry, lights, batchSize, renderManager, 0, lastBindUnits.textureUnit);
            renderer.setShader(shader);
            renderMeshFromGeometry(renderer, geometry);
        } else {
            while (nbRenderedLights < lights.size()) {
                nbRenderedLights = updateLightListUniforms(shader, geometry, lights, batchSize, renderManager, nbRenderedLights, lastBindUnits.textureUnit);
                renderer.setShader(shader);
                renderMeshFromGeometry(renderer, geometry);
            }
        }
    }
Uploads the lights in the light list as two uniform arrays.
<p>
<code>uniform vec4 g_LightColor[numLights];</code> //
g_LightColor.rgb is the diffuse/specular color of the light. //
g_LightColor.a is the type of light, 0 = Directional, 1 = Point, 2 = Spot.
<code>uniform vec4 g_LightPosition[numLights];</code> //
g_LightPosition.xyz is the position of the light (for point lights)
// or the direction of the light (for directional lights). //
g_LightPosition.w is the inverse radius (1/r) of the light (for
attenuation) </p>

@param shader the Shader being used
@param g the Geometry being rendered
@param lightList the list of lights
@param numLights the number of lights to upload
@param rm to manage rendering
@param startIndex the starting index in the LightList
@param lastTexUnit the index of the most recently-used texture unit
@return the next starting index in the LightList
jme3-core/src/main/java/com/jme3/material/logic/SinglePassAndImageBasedLightingLogic.java