             }
             
 			for (var lightId : uint = 0;
-                lightPropertyExists(sceneBindings, lightId, 'enabled');
+                lightPropertyExists(sceneBindings, lightId, 'enabled')
+                    && getLightProperty(sceneBindings, lightId, 'enabled');
                 ++lightId)
 			{
                 var lightType : uint = getLightProperty(sceneBindings, lightId, 'type');

            var passes : Vector.<Shader>    = super.initializePasses(sceneBindings, meshBindings);
            
            for (var lightId : uint = 0;
                lightPropertyExists(sceneBindings, lightId, 'enabled');
                ++lightId)
            {
                if (lightPropertyExists(sceneBindings, lightId, 'shadowCastingType'))

				}
			}
            
//            if (ambientEnabled)
//                passes.push(new PhongAmbientShader(renderTarget, .75));
            
            passes.push(new ZPrepassShader(renderTarget, 1));
            passes.push(new PhongEmissiveShader(
