 			var passes			: Array				= _passes.concat();
 			var clearedTargets	: Dictionary		= new Dictionary(true);
 			
-			for (i = 0; i < numPasses; ++i)
-			{
-				var pass			: ShaderInstance	= passes[i];
+			for (passId = 0; passId < numPasses; ++passId)
+			{
+				var pass			: ShaderInstance	= passes[passId];
 				var calls 			: Array				= _passInstanceToDrawCalls[pass];
 				var settings		: ShaderSettings	= pass.settings;
 				var renderTarget 	: RenderTarget 		= settings.renderTarget || backBuffer;

				clearedTargets[renderTarget] = true;
				
				if (!pass.settings.enabled || !pass.shader.enabled || !calls)
					continue;
				
				++_numEnabledPasses;
				

				// sort draw calls if necessary
				if (pass.settings.depthSortDrawCalls)
				{
					for (var drawCallId : uint = 0; drawCallId < numCalls; ++drawCallId)
						sortValues[drawCallId] = -(calls[drawCallId] as DrawCall).depth;
					
					Sort.flashSort(sortValues, calls, numCalls);
				}
