Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 2180)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 2265)
@@ -111,4 +111,8 @@
 		rt->setAutoUpdated(false);
 		v->setBackgroundColour(clearColor);
+		Root::getSingleton()._getCurrentSceneManager()->getRenderQueue()->clear();
+		Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(false);
+        rt->update();
+		Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(true);
 		
 		Root::getSingleton().getRenderSystem()->_setViewport(v);
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreFocusingMapRenderingRun.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreFocusingMapRenderingRun.cpp	(revision 1425)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreFocusingMapRenderingRun.cpp	(revision 2265)
@@ -106,9 +106,9 @@
 	
 	
-	MaterialPtr mat = MaterialManager::getSingleton().getByName("GameTools/FocusingShader");
+	MaterialPtr mat = MaterialManager::getSingleton().getByName("GTP/Basic/Focusing");
 	GpuProgramParameters* Vparams = mat->getTechnique(0)->getPass(0)->getVertexProgramParameters().getPointer();
-	Vparams->setNamedConstant("lightTransform", lightMatrix);
+	Vparams->setNamedConstant("LightViewProj", lightMatrix);
 		
-	setMaterialForVisibles(String("GameTools/FocusingShader"), camera);
+	setMaterialForVisibles(String("GTP/Basic/Focusing"), camera);
 
 	RenderTarget* rt = focusingTexture->getBuffer().getPointer()->getRenderTarget();
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp	(revision 2180)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp	(revision 2265)
@@ -83,34 +83,4 @@
 			if(useEnvMaterial)
 			{
-/////////////////////////////////////////////////////////////////
-////   DEBUG
-/////////////////////////////////////////////////////////////////
-/*		Camera* camm = new Camera("tempCAm", sm);
-		TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual(	"tempRT", 
-																			"default",
-																			TEX_TYPE_2D,
-																			256,
-																			256,
-																			0,
-																			0,
-																			PF_FLOAT16_RGBA,
-																			TU_RENDERTARGET);
-		camm->setPosition(0,50,0);
-		camm->setAspectRatio(1);
-		camm->setFOVy(Radian(Degree(90)));
-		camm->setNearClipDistance(0.1);
-		camm->setFarClipDistance(1000);
-		Texture* result = texPtr.getPointer();
-		HardwarePixelBuffer* hpb = (result->getBuffer()).getPointer();
-		RenderTarget* rt = hpb->getRenderTarget(0);
-		Viewport* v = rt->addViewport(camm);
-		v->setOverlaysEnabled(false);
-		rt->setAutoUpdated(false);
-		
-		int cnt = sm->_findVisibleObjectsOC(camm, v, false, true, false);
-		int cnt2 = sm->_findVisibleObjectsOC(cam, v, false, true, false);
-		int cnt3 = sm->_findVisibleObjectsOC(camm, cam->getViewport(), false, true, false);
-		int cnt3 = sm->_findVisibleObjectsOC(cam, cam->getViewport(), false, true, false);*/
-///////////////////////////////////////////////////
 				setMaterialForVisibles(environmentMaterial, cam);
 				//sm->_queueSkiesForRendering(cam);				
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp	(revision 2200)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp	(revision 2265)
@@ -256,6 +256,6 @@
 	photonMapResolution = 64;
 	causticCubeMapResolution = 128;	
-	photonMapMaterialName = "GameTools/PhotonMapCaustic";
-	causticMapMaterialName = "GameTools/Cau";
+	photonMapMaterialName = "GTP/Caustic/PhotonMap_HitEnv";
+	causticMapMaterialName = "GTP/Caustic/CauCube_PointSprite";
 	photonMapTexID = 0;
 	useDistance = true;
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp	(revision 2055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp	(revision 2265)
@@ -49,5 +49,5 @@
 									GpuProgramParameters::ACT_WORLD_MATRIX);
 		GpuProgramParameters* Fparams = newpass->getFragmentProgramParameters().getPointer();
-		Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0));
+		//Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0));
 
 		TextureUnitState* st = newpass->createTextureUnitState();
@@ -59,5 +59,5 @@
 		newpass->setSceneBlending(SBF_DEST_COLOUR, SBF_ONE);
 		//newpass->setSceneBlending(SBF_ONE, SBF_ZERO);
-		newpass->setDepthBias(5);
+		newpass->setDepthBias(1);
 		//newpass->setSceneBlending(SBT_ADD);
 		
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp	(revision 1956)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp	(revision 2265)
@@ -105,6 +105,6 @@
 	OgreCubeMapRenderTechniqueFactory::resetParams();
 	texID = 1;
-	environmentMaterial = "GameTools/DistanceShader";
-	selfMaterial = "GameTools/DistanceShader";
+	environmentMaterial = "GTP/Basic/Distance";
+	selfMaterial = "GTP/Basic/Distance";
 	OgreCubeMapRenderTechniqueFactory::parseParams(params);	
 	parseParams(params);
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreSharedRuns.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreSharedRuns.cpp	(revision 1722)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreSharedRuns.cpp	(revision 2265)
@@ -67,5 +67,5 @@
 		sharedRuns[runType]->update(frameNum);
 	*/
-	RenderingRun* run = getRun(runType);
+	RenderingRun* run = getRoot(runType)->getRun(runType);
 	
 	if(run->update(frameNum))
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp	(revision 2240)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp	(revision 2265)
@@ -430,9 +430,9 @@
 		fillVisibleList(rq);	
 
-//		int l = visibleObjects.size(); //debug
+		int l = visibleObjects.size(); //debug
 		
 		joinSharedRuns();
 
-//		int ll = sharedRunRoots.size(); //debug
+		int ll = sharedRunRoots.size(); //debug
 
 		//update precomputings				
