Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreSharedRuns.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreSharedRuns.h	(revision 790)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreSharedRuns.h	(revision 1055)
@@ -6,4 +6,17 @@
 using namespace Ogre;
 
+enum GlobalTargetType
+{
+	ILLUM_GLOBAL_TARGET_FIREPARTICLES
+};
+
+class GlobalUseRenderTarget
+{
+public:
+	GlobalUseRenderTarget(){lastUpdated = 0; renderTarget = 0;}
+	
+	unsigned long lastUpdated;
+	RenderTarget* renderTarget;
+};
 /**
 	@brief Class of SharedRuns used in an OGRE environment.	
@@ -112,5 +125,5 @@
 		@param r2 pointer to the other SharedRuns instance
 	*/
-	static bool haveCommonRuns(SharedRuns* r1, SharedRuns* r2);
+	static bool haveCommonRuns(SharedRuns* r1, SharedRuns* r2, std::vector<RenderingRunType>& commonruns);
 	/**
 		@brief Checks if this node has a resource with the given type.
@@ -170,6 +183,17 @@
 	//inherited
 	void destroy();
+	void runUpdated(RenderingRunType runType, RenderingRun* run);
+	void runChanged(RenderingRunType runType, RenderingRun* run);
+	virtual void addTechniqueGroup(TechniqueGroup* group){childTechniqueGroups.push_back(group);}
 	
 protected:
+	/**
+		@brief child TechniqueGroup instance.
+
+		If this SharedRuns node is a leaf, it containes a reference to a TechniqueGroup instance.
+		All messages will be transfered to this object, 
+		and bounding information will be retrieved from this TechniqueGroup
+	*/
+	std::vector<TechniqueGroup*> childTechniqueGroups;
 	/**
 		@brief map of contained RenderingRuns
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h	(revision 949)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h	(revision 1055)
@@ -13,4 +13,5 @@
 #include "OgreDepthShadowMapRenderingRun.h"
 #include "OgreDepthShadowRecieverRenderTechnique.h"
+#include "OgreFireRenderTechnique.h"
 
 
@@ -51,4 +52,6 @@
 	*/
 	BillboardSet* findRenderableInParticleSystem(ParticleSystem* system);
+	void preAllUpdates();
+	void postAllUpdates();
 
 	/**
@@ -62,4 +65,5 @@
 	*/
 	float maxRad;
+	std::map<RenderingRunType,float> maxRads;
 	/**
 		@brief The camera attached to the player.
@@ -106,7 +110,11 @@
 	std::map<String, OgreSharedRuns*> perLightRuns;
 
-	
+	std::map<GlobalTargetType, GlobalUseRenderTarget*> globalTargets;
+
+	std::vector<UpdateListener*> updateListeners;
+
 public:
 
+	void addUpdateListener(UpdateListener* l){updateListeners.push_back(l);}
 	/**
 		@brief registers a RenderTechniqueFactory
@@ -120,8 +128,23 @@
 	*/
 	float getMaxJoinRadius(){return maxRad;}
+	float getMaxJoinRadius(RenderingRunType type){return maxRads[type];}
 	/**
 		@brief sets the maximum bounding sphere radius with two SharedRuns can be joined.
 	*/
-	void setMaxJoinRadius(float rad){maxRad = rad;}
+	void setMaxJoinRadius(float rad)
+	{
+		std::map<RenderingRunType,float> ::iterator it = maxRads.begin();
+		std::map<RenderingRunType,float> ::iterator itend = maxRads.end();
+		
+		maxRad = rad;
+	
+		while(it != itend)
+		{
+			(*it).second = maxRad;
+			it++;
+		}
+		
+	}
+	void setMaxJoinRadius(RenderingRunType type, float rad){maxRads[type] = rad;}
 	/**
 		@brief Returns the one and only OgreIlluminationManager instance.
@@ -146,4 +169,8 @@
 	*/
 	void initTechniques(Entity* e);
+	/**
+		@brief searches for RenderTechniques in materials and creates them for a Billboardset.
+	*/
+	void initTechniques(BillboardSet* bbs, ParticleSystem* sys);
 	/**
 		@brief Returns a pointer to the player camera.
@@ -224,4 +251,7 @@
 	*/
 	RenderingRun* getGlobalRun(RenderingRunType runType);
+
+	GlobalUseRenderTarget* getGlobalTarget(GlobalTargetType type);
+	void addGlobalTarget(GlobalTargetType type, GlobalUseRenderTarget* target);
 	/**
 		@brief Updates a global RenderingRun with the given type.
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h	(revision 808)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h	(revision 1055)
@@ -30,4 +30,6 @@
 	*/
 	OgreRenderingRun* asOgreRenderingRun(){return this;}
+
+	virtual bool canJoin(OgreRenderingRun* run){return true;}
 
 protected:
@@ -66,5 +68,5 @@
 		@see renderPixelSprites
 	*/
-	SpriteSet* pixelSprites;
+	BillboardSet* pixelSprites;
 	/**
 		@brief unique name of the SpriteSet used in pixel sprite rendering
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgrePhotonMapRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgrePhotonMapRenderingRun.h	(revision 949)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgrePhotonMapRenderingRun.h	(revision 1055)
@@ -48,5 +48,11 @@
 	void refreshLight();
 
-	
+	bool canJoin(OgreRenderingRun* run)
+	{
+		OgrePhotonMapRenderingRun* r = (OgrePhotonMapRenderingRun*) run;
+		if(r->materialName == materialName)
+			return true;
+		return false;
+	}
 	void distanceCubeMapChanged(RenderingRun* run);
 	
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h	(revision 790)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h	(revision 1055)
@@ -40,5 +40,6 @@
 								 String materialName,
 								 unsigned char photonMapTexId,
-								 bool updateAllFace
+								 bool updateAllFace,
+								 float attenuation
 								 );
 	/**
@@ -49,5 +50,14 @@
 	//inherited
 	void photonMapChanged(RenderingRun* run);
+	float getAttenuation(){return attenuation;}
 	
+	bool canJoin(OgreRenderingRun* run)
+	{
+		OgreCausticCubeMapRenderingRun* r = (OgreCausticCubeMapRenderingRun*) run;
+		if(r->materialName == materialName)
+			return true;
+		return false;
+	}
+
 protected:
 	/**
@@ -71,4 +81,5 @@
 	*/
 	String materialName;
+	float attenuation;
 	
 	//inherited
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreChildPSystemRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreChildPSystemRenderingRun.h	(revision 1055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreChildPSystemRenderingRun.h	(revision 1055)
@@ -0,0 +1,83 @@
+#pragma once
+
+//disable inheritance warning caused by multiple inheritance
+#if _WIN32
+#if _MSC_VER
+#pragma warning(disable: 4250)
+#endif
+#endif
+
+#include "OgreRenderingRun.h"
+#include "ChildPSystemRenderingRun.h"
+#include "OgreSharedRuns.h"
+
+
+/**
+	@brief ColorCubeMapRenderingRun used in an OGRE environment.
+*/
+class OgreChildPSystemRenderingRun : public OgreRenderingRun,
+									public ChildPsystemRenderingRun
+{	
+public:
+
+	/**
+		@brief Constructor.
+
+		@param sharedRuns			a pointer to the OgreSharedRuns this run belongs to
+		@param name					the name of the texture to be created
+		@param startFrame			adds an offset to the current frame number to help evenly distribute updates between frames
+		@param updateInterval		update frequency
+		@param materialName			the name of the material should be used when rendering the choton hit map
+*/	
+	OgreChildPSystemRenderingRun(OgreSharedRuns* sharedRuns,
+								String name,
+								unsigned long startFrame,
+								unsigned long updateInterval,
+								unsigned int resolution,
+								bool perspectiveRendering,
+								String childParticleSystemName,
+								String particleScriptName,
+								bool useOwnMaterial,
+								String materialName
+								);
+	/**
+		@brief returns the name of the resulting photon hit map
+	*/
+	String getImpostorTextureName(){return name;}
+	
+	bool canJoin(OgreRenderingRun* run)
+	{
+		
+		return false;
+	}
+	
+protected:	
+	bool perspectiveRendering;
+	bool useOwnMaterial;
+	String materialName;
+	String childParticleSystemName;
+	String particleScriptName;
+	/**
+		@brief the created photon hit map texture
+	*/
+	Camera* impostorCamera;
+	/**
+		@brief a pointer to the OgreSharedRuns this run belongs to
+	*/
+	OgreSharedRuns* sharedRuns;
+	/**
+		@brief the name of the photonmap texture that was created by this run
+	*/
+	String name;
+	/**
+		@brief a pointer to the photonmap texture that was created by this run
+	*/
+	Texture* impostorTexture;
+	
+
+	//inherited
+	void updateFrame(unsigned long frameNum);	
+	//inherited
+	inline void createImpostorTexture();
+
+};
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h	(revision 790)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h	(revision 1055)
@@ -41,5 +41,5 @@
 		@brief returns the depth shadow map texture created by this run
 	*/
-	String getDepthMapTextureName(){return name;}
+	String getDepthMapTextureName(int i){return names[i];}
 	/**
 		@brief Refreshes light camera matrices, called in each update.
@@ -49,9 +49,9 @@
 		@brief retuns the view matrix of the camera from which the depth shadow map was created
 	*/
-	Matrix4 getLightViewMatrix();
+	Matrix4 getLightViewMatrix(int i);
 	/**
 		@brief retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created
 	*/
-	Matrix4 getLightViewProjMatrix();
+	Matrix4 getLightViewProjMatrix(int i);
 
 protected:	
@@ -63,5 +63,5 @@
 		@brief pointer to the camera of the lightsource
 	*/
-	Camera* depthMapCamera;
+	Camera* depthMapCameras[2];
 	/**
 		@brief the name of the material to be used when rendering the depth shadow map
@@ -75,9 +75,9 @@
 		@brief the name of the depth shadow map texture that was created by this run
 	*/
-	String name;
+	String names[2];
 	/**
 		@brief a pointer to the depth shadow texture that was created by this run
 	*/
-	Texture* depthMapTexture;
+	Texture* depthMapTextures[2];
 	
 	//inherited
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/Másolat - OgreRenderingRun.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/Másolat - OgreRenderingRun.h	(revision 1055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/Másolat - OgreRenderingRun.h	(revision 1055)
@@ -0,0 +1,157 @@
+#pragma once
+#include "RenderingRun.h"
+#include "Ogre.h"
+#include "SpriteSet.h"
+
+using namespace Ogre;
+
+/**
+	@brief Base class of a RenderingRun in an OGRE environment.	
+*/
+class OgreRenderingRun : virtual public RenderingRun
+{	
+public:	
+	/**
+		@brief Constructor.
+		
+		@param startFrame			adds an offset to the current frame number to help evenly distribute updates between frames
+		@param updateInterval		photon map update frequency		
+	*/
+	OgreRenderingRun(unsigned long startFrame,
+					unsigned long updateInterval)
+						:RenderingRun(startFrame, updateInterval)
+	{
+		pixelSprites = 0;
+	}
+	/**
+		@brief Conversion to OgreRenderRun.
+
+		This function is needed because of virtual inheritance.
+	*/
+	OgreRenderingRun* asOgreRenderingRun(){return this;}
+
+protected:
+
+	/**
+		@brief map of Renderables which will be rendered with a given material
+
+		The String stores the original material name that will be restored after rendering.
+
+		@see setMaterialForVisibles
+		@see setMaterialForRenderables
+		@see restoreMaterials
+	*/
+	std::map<Renderable*, String> visibleObjects;
+	/**
+		@brief fulls screen quad plane used in full screen quad rendering
+
+		@see renderFullscreenQuad
+	*/
+	static MovablePlane* fullScreenQuad;
+	/**
+		@brief fulls screen quad Entity used in full screen quad rendering
+
+		@see renderFullscreenQuad
+	*/
+	static Entity* fullScreenQuadEntity;
+	/**
+		@brief fulls screen quad SceneNode used in full screen quad rendering
+
+		@see renderFullscreenQuad
+	*/
+	static SceneNode* fullScreenQuadNode;
+	/**
+		@brief SpriteSet used in pixel sprite rendering
+
+		@see renderPixelSprites
+	*/
+	SpriteSet* pixelSprites;
+	/**
+		@brief unique name of the SpriteSet used in pixel sprite rendering
+
+		@see renderPixelSprites
+	*/
+	String spriteSetName;
+
+	/**
+		@brief Returns a direction for a cubemap face id.
+
+		This is a helper function to retrieve the normal direction of a given 
+		cubemap face.
+
+		@param faceId the number of the face
+	*/
+	Vector3 getCubeMapFaceDirection(unsigned char faceId);
+	/**
+		@brief Creates a cubemap texture.
+
+		This is a helper function to easily create a cubemap texture and automaticly attach
+		viewports to each face so it can be used as a rendertarget.
+
+		@param name the name of the texture to be created
+		@param position the initial position of the cubemap
+		@param resolution the resolution of one cubemapface
+		@param format the pixel format of the cubemap
+		@param numMips the number of mipmap levels
+		@param clearColor initial color
+	*/
+	Texture* createCubeRenderTexture(String name, const Vector3 position, unsigned int resolution = 512, PixelFormat format = PF_FLOAT16_RGBA, int numMips = 0, ColourValue clearColor = ColourValue::Black);
+	/**
+		@brief Sets the given material for each Renderable in a RenderQueue.
+
+		This is a helper function to set a material to each element of a previously filled Renderque.
+		The orginal material of the Renderables are stored so they can be restored later.
+		The function also tells the current SceneManager not to search for visible objects, as we are
+		going to use the given RenderQueue during the next rendering.
+
+		@param materialName the name of the material to set for the Renderables
+		@param rq pointer to the filled Renderqueue instance to set material for
+	*/
+	void setMaterialForRenderables(String& materialName, RenderQueue* rq);
+	/**
+		@brief Sets the given material for each Renderable visible from a given camera.
+
+		This helper function is similar to setMaterialForRenderables but it is also responsible for filling the RenderQueue.
+		First the RenderQueue of the current SceneManager fill be filled with the visible objects seen from the given camera.
+		Then the required material will be set for each element of the RenderQueue.
+		The orginal material of the Renderables are stored so they can be restored later.
+		The function also tells the current SceneManager not to search for visible objects, as we are
+		going to use the filled RenderQueue during the next rendering.
+
+		@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, bool shadowcastersonly = false);
+	/**
+		@brief Restores previously stored materials.
+
+		This helper function is typically used after a setMaterialForRenderables or setMaterialForVisibles
+		call and a rendering process to restore the original material settings.
+		The function also tells the current SceneManager to search for visible objects, as this is the
+		default behaviour of SceneManager.		
+	*/
+	void restoreMaterials();
+	/**
+		@brief Renderes a full screen quad on a given RendderTarget with a given material.
+
+		@param materialName the name of the material bind to the quad
+		@param target the RenderTarget the quad should be rendered on
+	*/
+	void renderFullscreenQuad(String materialName, RenderTarget* target);
+	/**
+		@brief Renderes sprites to pixels of the screen on a given RendderTarget with a given material.
+
+		Pixel sprites are pixel sized quads, placed on each pixel of the RenderTarget.
+		The number of sprites not necessary corresponds to the resolution of the rendertarget.
+		The pixel quads will evenly fill the rendertarget's area with sizes corresponding to the given resolution.
+		We can render fewer or more pixel quads than the number of pixels the rendertarget has (eg.: in case of caustic cubemap generation).
+		
+		@param materialName the name of the material bind to the pixel sprites
+		@param rt the RenderTarget the quads should be rendered on
+		@param width the desired resolution width of the sprites
+		@param height the desired resolution height of the sprites
+	*/
+	void renderPixelSprites(String& materialName, RenderTarget* rt, int width, int height);
+	
+};
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderable.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderable.h	(revision 790)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderable.h	(revision 1055)
@@ -45,5 +45,5 @@
 		@param billboardset the BillboardSet to wrap
 	*/
-	OgreRenderable(BillboardSet* billboardset);
+	OgreRenderable(BillboardSet* billboardset, ParticleSystem* sys = 0);
 	/**
 		@brief Destructor.
@@ -149,4 +149,5 @@
 	*/
 	BillboardSet* billboardSetRenderable;
+	ParticleSystem* parentParticleSystem;
 
 	/**
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderTechnique.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderTechnique.h	(revision 836)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderTechnique.h	(revision 1055)
@@ -5,4 +5,11 @@
 
 class OgreTechniqueGroup;
+
+class UpdateListener
+{
+public:
+	virtual void preAllUpdates(){}
+	virtual void postAllUpdates(){}
+};
 
 /**
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h	(revision 836)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h	(revision 1055)
@@ -18,5 +18,8 @@
 */
 class OgreSBBRenderTechnique : public OgreRenderTechnique,
-										public SBBRenderTechnique
+										public SBBRenderTechnique,
+										public RenderTargetListener,
+										public FrameListener,
+										public UpdateListener
 {
 public:
@@ -39,4 +42,10 @@
 	//inherited
 	virtual void update(unsigned long frameNum);
+
+	void  preRenderTargetUpdate (const RenderTargetEvent &evt);
+	void  postRenderTargetUpdate (const RenderTargetEvent &evt);
+	bool  frameEnded (const FrameEvent &evt);
+	void preAllUpdates();
+	void postAllUpdates();
 	
 protected:	
@@ -45,4 +54,6 @@
 	*/
 	unsigned char depthTexID;
+
+	bool lastVisibility;
 	
 };
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreHierarchicalParticleSystemTechnique.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreHierarchicalParticleSystemTechnique.h	(revision 1055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreHierarchicalParticleSystemTechnique.h	(revision 1055)
@@ -0,0 +1,73 @@
+#pragma once
+
+//disable inheritance warning caused by multiple inheritance
+#if _WIN32
+#if _MSC_VER
+#pragma warning(disable: 4250)
+#endif
+#endif
+
+#include "OgreRenderTechnique.h"
+#include "HierarchicalParticleSystemTechnique.h"
+
+/**
+	@brief CausticCasterRenderTechnique used in an OGRE environment.
+*/
+class OgreHierarchicalParticleSystemTechnique : public OgreRenderTechnique,
+											public HierarchicalParticleSystemTechnique
+{
+public:
+
+	OgreHierarchicalParticleSystemTechnique(unsigned long startFrame,
+							unsigned long impostorUpdateInterval,
+							unsigned int impostorResolution,
+							unsigned char impostorTexID,
+							bool useDistCalc,
+							bool perspectiveRendering,
+							String childPSysScriptName,
+							bool useOwnMaterial,
+							String impostorMaterialName,
+							Pass* pass,
+							OgreRenderable* parentRenderable,
+							OgreTechniqueGroup* parentTechniqueGroup
+							);
+	/**
+		@brief Destructor.
+	*/
+	~OgreHierarchicalParticleSystemTechnique();	
+	
+protected:
+	
+	String impostorMaterialName;
+	String childPSysScriptName;
+	String childPSysName;
+	unsigned char impostorTexID;
+	bool useOwnMaterial;
+	
+	//inherited
+	RenderingRun* createChildPSysRenderingRun();
+};
+
+class OgreHierarchicalParticleSystemTechniqueFactory : public RenderTechniqueFactory
+{
+public:
+	
+	OgreHierarchicalParticleSystemTechniqueFactory();
+
+	OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
+										Pass* pass,
+										OgreRenderable* parentRenderable,
+										OgreTechniqueGroup* parentTechniqueGroup);
+
+
+	unsigned long impostorUpdateInterval;
+	unsigned int impostorResolution;
+	unsigned long startFrame;	
+	bool useDistCalc;
+	unsigned char impostorTexID;
+	bool perspectiveRendering;
+	String impostorMaterialName;
+	String childPSysScriptName;
+	bool useOwnMaterial;
+
+};
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h	(revision 949)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h	(revision 1055)
@@ -43,4 +43,5 @@
 							bool updateAllFace,
 							bool useDistance,
+							float attenuation,
 							Pass* pass,
 							OgreRenderable* parentRenderable,
@@ -57,7 +58,8 @@
 	*/
 	String& getCausticCubeMapName();
+	float getAttenuation(){return attenuation;}
 
 protected:
-
+	
 	/**
 		@brief name of the created photon hit map texture
@@ -72,19 +74,20 @@
 	*/
 	unsigned char photonMapTexID;
+	float attenuation;
 	
 	//inherited
-	virtual void photonMapRunChanged(RenderingRun* run);
+	void photonMapRunChanged(RenderingRun* run);
 	//inherited	
-	virtual void causticCubeMapRunChanged(RenderingRun* run);
+	void causticCubeMapRunChanged(RenderingRun* run);
 	//inherited
-	virtual void distanceCubeMapRunChanged(RenderingRun* run);
+	void distanceCubeMapRunChanged(RenderingRun* run);
 	//inherited
 	void distanceCubeMapRunUpdated(RenderingRun* run);
 	//inherited
-	virtual RenderingRun* createPhotonMapRun();
+	RenderingRun* createPhotonMapRun();
 	//inherited
-	virtual RenderingRun* createCausticCubeMapRun();
+	RenderingRun* createCausticCubeMapRun();
 	//inherited
-	virtual RenderingRun* createDistanceCubeMapRun();
+	RenderingRun* createDistanceCubeMapRun();
 };
 
@@ -102,4 +105,5 @@
 
 
+	float attenuation;
 	unsigned long startFrame;
 	unsigned long photonMapUpdateInterval;
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreFireRenderTechnique.h
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreFireRenderTechnique.h	(revision 1055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreFireRenderTechnique.h	(revision 1055)
@@ -0,0 +1,86 @@
+#pragma once
+
+//disable inheritance warning caused by multiple inheritance
+#if _WIN32
+#if _MSC_VER
+#pragma warning(disable: 4250)
+#endif
+#endif
+
+#include "OgreRenderTechnique.h"
+#include "Ogre.h"
+
+using namespace Ogre;
+
+class FireRenderTarget :  public GlobalUseRenderTarget
+{
+	
+public:
+
+	static int targetsize;
+
+	FireRenderTarget();	
+};
+
+
+
+/**
+	@brief SBBRenderTechnique used in an OGRE environment.
+*/
+class OgreFireRenderTechnique : public OgreRenderTechnique,
+									public RenderTargetListener,
+									public FrameListener,
+									public UpdateListener
+{
+public:
+	/**
+		@brief Constructor.
+
+		@param depthTexID				the id of the texture unit state the resulting
+											scene depth map should be bound to
+		@param pass						the pass to operate on			
+		@param parentRenderable			the object to operate on
+		@param parentTechniqueGroup		the TechniqueGroup this RenderedTechnique is attached to
+	*/
+	OgreFireRenderTechnique(	unsigned char depthTexID,
+							Pass* pass,
+							OgreRenderable* parentRenderable,
+							OgreTechniqueGroup* parentTechniqueGroup
+							);
+	~OgreFireRenderTechnique();
+	
+	//inherited
+	virtual void update(unsigned long frameNum);
+
+	void  preRenderTargetUpdate (const RenderTargetEvent &evt);
+	void  postRenderTargetUpdate (const RenderTargetEvent &evt);
+	bool  frameEnded (const FrameEvent &evt);
+	void preAllUpdates();
+	
+protected:	
+	/**
+		&brief the id of the texture unit state the resulting scene depth map should be bound to
+	*/
+	unsigned char depthTexID;
+	bool lastVisibility;
+	
+};
+
+
+class OgreFireRenderTechniqueFactory : public RenderTechniqueFactory
+{
+public:
+	
+	OgreFireRenderTechniqueFactory();
+
+	OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
+										Pass* pass,
+										OgreRenderable* parentRenderable,
+										OgreTechniqueGroup* parentTechniqueGroup);
+
+
+	unsigned char depthTexID;
+
+};
+
+
