private int setProbeData(RenderManager rm, int lastTexUnit, Uniform lightProbeData, Uniform shCoeffs,
            Uniform lightProbePemMap, LightProbe lightProbe) {
        lightProbeData.setValue(VarType.Matrix4, lightProbe.getUniformMatrix());
        //setVector4InArray(lightProbe.getPosition().x, lightProbe.getPosition().y, lightProbe.getPosition().z, 1f / area.getRadius() + lightProbe.getNbMipMaps(), 0);
        shCoeffs.setValue(VarType.Vector3Array, lightProbe.getShCoeffs());
        /*
         * Assign the prefiltered env map to the next available texture unit.
         */
        int pemUnit = lastTexUnit++;
        Renderer renderer = rm.getRenderer();
        TextureCubeMap pemTexture = lightProbe.getPrefilteredEnvMap();
        try {
            renderer.setTexture(pemUnit, pemTexture);
        } catch (TextureUnitException exception) {
            String message = "Can't assign texture unit for LightProbe."
                    + " lastTexUnit=" + lastTexUnit;
            throw new IllegalArgumentException(message);
        }
        lightProbePemMap.setValue(VarType.Int, pemUnit);
        return lastTexUnit;
    }
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