void DeferredShadingSystem::setupLightMaterials(void)
{
	assert( mLightMaterialsDirty 
		&& mCurrentMode == DSM_SHOWLIT
		&& mInstance[mCurrentMode]->getEnabled()==true);

	CompositorInstance* ci = mInstance[mCurrentMode];

	String mrt0 = ci->getTextureInstanceName("mrt_output", 0);
	String mrt1 = ci->getTextureInstanceName("mrt_output", 1);

	for(LightList::iterator it = mDirtyLightList.begin(); it != mDirtyLightList.end(); ++it)
	{
		MLight* light = *it;
		setupMaterial(light->getMaterial(), mrt0, mrt1);
	}

	mLightMaterialsDirty = false;
}
void DeferredShadingSystem::logCurrentMode(void)
{
	if (mActive==false)
	{
		LogManager::getSingleton().logMessage("No Compositor Enabled!");
		return;
	}

	CompositorInstance* ci = mInstance[mCurrentMode];
	assert(ci->getEnabled()==true);

	LogManager::getSingleton().logMessage("Current Mode: ");
	LogManager::getSingleton().logMessage(ci->getCompositor()->getName());
		
	if (mCurrentMode==DSM_SHOWLIT)
	{			
		LogManager::getSingleton().logMessage("Current mrt outputs are:");
		LogManager::getSingleton().logMessage(ci->getTextureInstanceName("mrt_output", 0));
		LogManager::getSingleton().logMessage(ci->getTextureInstanceName("mrt_output", 1));
	}
}