@ -69,6 +69,8 @@ public class AmbientLight extends Light {
@Override
public void computeLastDistance(Spatial owner) {
// ambient lights must always be before directional lights.
lastDistance = -2;
}
@ -80,7 +80,9 @@ public class DirectionalLight extends Light {
lastDistance = 0; // directional lights are always closest to their owner
// directional lights are after ambient lights
// but before all other lights.
lastDistance = -1;
/**