Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h	(revision 808)
@@ -121,6 +121,7 @@
 		@param materialName the name of the material to set for the Renderables
 		@param cam pointer to the camera from which visible objects should be searched
+		@param shadowcastersonly flag to search for only shadow casters
 	*/
-	void setMaterialForVisibles(String& materialName, Camera* cam);
+	void setMaterialForVisibles(String& materialName, Camera* cam, bool shadowcastersonly = false);
 	/**
 		@brief Restores previously stored materials.
Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.vcproj
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.vcproj	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.vcproj	(revision 808)
@@ -22,5 +22,5 @@
 				ImproveFloatingPointConsistency="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;GAMETOOLS_ILLUMINATION_MODULE"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
@@ -76,5 +76,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;GAMETOOLS_ILLUMINATION_MODULE"
 				StringPooling="TRUE"
 				MinimalRebuild="TRUE"
@@ -330,7 +330,4 @@
 				</File>
 				<File
-					RelativePath="..\..\..\..\..\App\Demos\Illum\Ogre\Media\materials\programs\GameTools_SoftShadow.hlsl">
-				</File>
-				<File
 					RelativePath="..\..\..\..\..\App\Demos\Illum\Ogre\Media\materials\programs\GameTools_Sprite.hlsl">
 				</File>
Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 808)
@@ -144,5 +144,5 @@
 }
 
-void OgreRenderingRun::setMaterialForVisibles(String& materialName, Camera* cam)
+void OgreRenderingRun::setMaterialForVisibles(String& materialName, Camera* cam, bool shadowcastersonly)
 {
 	SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
@@ -158,5 +158,5 @@
 	}
 
-	sm->_findVisibleObjects (cam, false);
+	sm->_findVisibleObjects (cam, shadowcastersonly);
 	
 	setMaterialForRenderables(materialName, rq);
Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp	(revision 808)
@@ -76,9 +76,11 @@
 	rt->update();	
 	/*
+	static int framecount = 0;
 	String filename = "photon";
-	//filename.append(StringConverter::toString(frameNum));
+	filename.append(StringConverter::toString(framecount));
 	filename.append(".png");
-	rt->writeContentsToFile(filename);*/
-
+	rt->writeContentsToFile(filename);
+	framecount++;*/
+	
 	restoreMaterials();
 }
Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp	(revision 808)
@@ -64,8 +64,10 @@
 void OgreDepthShadowMapRenderingRun::updateDepthMap()
 {
-	setMaterialForVisibles(materialName, depthMapCamera);
+	setMaterialForVisibles(materialName, depthMapCamera, true);
 	
 	RenderTarget* rt = depthMapTexture->getBuffer().getPointer()->getRenderTarget();
-	 
+	
+	SceneManager* sm = Root::getSingleton()._getCurrentSceneManager();
+	
 	rt->update();	
 
Index: /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp	(revision 790)
+++ /GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp	(revision 808)
@@ -57,5 +57,6 @@
 		st2->setTextureFiltering(TFO_BILINEAR);
 
-		newpass->setSceneBlending(SBT_ADD);
+		newpass->setSceneBlending(SBF_DEST_COLOUR, SBF_ONE);
+		//newpass->setSceneBlending(SBT_ADD);
 		
 		techn->movePass(lastpass, index);			
