Index: trunk/BUTE/src/FinalRenderingRuns/SEMFinalGatheringPass.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/SEMFinalGatheringPass.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/SEMFinalGatheringPass.cpp	(revision 125)
@@ -0,0 +1,43 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "SEMFinalGatheringPass.h"
+
+SEMFinalGatheringPass::SEMFinalGatheringPass(Root* mRoot)
+:ManagedOgreRenderTexturePass(mRoot,ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
+{
+	setMaterialName("EnvMap/EnvMapMaterial");
+}
+
+SEMFinalGatheringPass::~SEMFinalGatheringPass(void)
+{
+
+}
+
+void SEMFinalGatheringPass::onRenderStart(NameValuePairList* namedParams){
+	effectWrapper->SetTechniqueToUse(0);
+	effectWrapper->BeginPass();
+	effectWrapper->SetVector3("g_EyePos",renderTargets.at(0)->getViewport(0)->getCamera()->getPosition());
+	effectWrapper->SetVector3("g_EnvMapPos",this->envMapPosition);
+	effectWrapper->SetVector3("g_SpecularColor",this->specularColor);
+	effectWrapper->SetFloat("g_Shininess",this->shininess);
+}
+
+void SEMFinalGatheringPass::onRenderEnd(NameValuePairList* namedParams){
+	effectWrapper->EndPass();
+}
+
+void SEMFinalGatheringPass::setEnvMapPostition(Vector3 envMapPosition){
+	this->envMapPosition=envMapPosition;
+}
+
+void SEMFinalGatheringPass::setSpecularColor(Vector3 specularColor){
+	this->specularColor = specularColor;
+}
+
+void SEMFinalGatheringPass::setShininess(float shininess){
+	this->shininess=shininess;
+}
+
+void SEMFinalGatheringPass::update(){
+}
Index: trunk/BUTE/src/FinalRenderingRuns/SoftShadowFinalRenderingRun.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/SoftShadowFinalRenderingRun.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/SoftShadowFinalRenderingRun.cpp	(revision 125)
@@ -0,0 +1,38 @@
+//	author:	Barnabas Aszodi (BME-IIT)
+
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "ManagedOgreRenderTexturePass.h"
+#include "FinalRenderingRun.h"
+
+#include "VRMRenderFinalPass.h"
+
+#include "SoftShadowFinalRenderingRun.h"
+
+
+SoftShadowFinalRenderingRun::SoftShadowFinalRenderingRun(Entity* entity)
+		:FinalRenderingRun(entity)
+{
+	iNumberOfSamples = 0;
+}
+
+
+void SoftShadowFinalRenderingRun::renderSingleEntity(RenderTarget* backBuffer, CubeMapFaces cf)
+{
+
+}
+
+const String& SoftShadowFinalRenderingRun::getSoftShadowMapTexture()
+{
+	return vRMRenderFinalPass->getMaterialName();
+}
+
+unsigned int SoftShadowFinalRenderingRun::getSoftShadowFilteringRate()
+{
+	return iNumberOfSamples;
+}	
+
+void SoftShadowFinalRenderingRun::setSoftShadowFilteringRate(unsigned int usedNumberOfSamples)
+{
+	iNumberOfSamples = usedNumberOfSamples;
+}
Index: trunk/BUTE/src/FinalRenderingRuns/DEMFinalGatheringPass.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/DEMFinalGatheringPass.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/DEMFinalGatheringPass.cpp	(revision 125)
@@ -0,0 +1,38 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "DEMFinalGatheringPass.h"
+
+DEMFinalGatheringPass::DEMFinalGatheringPass(Root* mRoot)
+:ManagedOgreRenderTexturePass(mRoot,ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
+{
+	setMaterialName("EnvMap/EnvMapMaterial");
+}
+
+DEMFinalGatheringPass::~DEMFinalGatheringPass(void)
+{
+
+}
+
+void DEMFinalGatheringPass::onRenderStart(NameValuePairList* namedParams){
+	effectWrapper->SetTechniqueToUse(0);
+	effectWrapper->BeginPass();
+	effectWrapper->SetVector3("g_EyePos",renderTargets.at(0)->getViewport(0)->getCamera()->getPosition());
+	effectWrapper->SetVector3("g_EnvMapPos",this->envMapPosition);
+	effectWrapper->SetVector3("g_DiffuseColor",this->diffuseColor);
+}
+
+void DEMFinalGatheringPass::onRenderEnd(NameValuePairList* namedParams){
+	effectWrapper->EndPass();
+}
+
+void DEMFinalGatheringPass::setEnvMapPosition(Vector3 envMapPosition){
+	this->envMapPosition=envMapPosition;
+}
+
+void DEMFinalGatheringPass::setDiffuseColor(Vector3 diffuseColor){
+	this->diffuseColor=diffuseColor;
+}
+
+void DEMFinalGatheringPass::update(){
+}
Index: trunk/BUTE/src/FinalRenderingRuns/FEMFinalGatheringPass.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/FEMFinalGatheringPass.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/FEMFinalGatheringPass.cpp	(revision 125)
@@ -0,0 +1,38 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "FEMFinalGatheringPass.h"
+
+FEMFinalGatheringPass::FEMFinalGatheringPass(Root* mRoot)
+:ManagedOgreRenderTexturePass(mRoot,ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
+{
+	setMaterialName("EnvMap/EnvMapMaterial");
+}
+
+FEMFinalGatheringPass::~FEMFinalGatheringPass(void)
+{
+
+}
+
+void FEMFinalGatheringPass::onRenderStart(NameValuePairList* namedParams){
+	effectWrapper->SetTechniqueToUse(0);
+	effectWrapper->BeginPass();
+	effectWrapper->SetVector3("g_EyePos",renderTargets.at(0)->getViewport(0)->getCamera()->getPosition());
+	effectWrapper->SetVector3("g_EnvMapPos",this->envMapPosition);
+	effectWrapper->SetFloat("g_FresnelFactor",this->fresnelFactor);
+}
+
+void FEMFinalGatheringPass::onRenderEnd(NameValuePairList* namedParams){
+	effectWrapper->EndPass();
+}
+
+void FEMFinalGatheringPass::setEnvMapPostition(Vector3 envMapPosition){
+	this->envMapPosition=envMapPosition;
+}
+
+void FEMFinalGatheringPass::setFresnelFactor(float fresnelFactor){
+	this->fresnelFactor=fresnelFactor;
+}
+
+void FEMFinalGatheringPass::update(){
+}
Index: trunk/BUTE/src/FinalRenderingRuns/SEMFinalRenderingRun.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/SEMFinalRenderingRun.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/SEMFinalRenderingRun.cpp	(revision 125)
@@ -0,0 +1,55 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "SEMFinalRenderingRun.h"
+
+SEMFinalRenderingRun::SEMFinalRenderingRun(Entity* entity,RenderTarget* backBuffer,const String& textureName)
+{	
+	
+	Root* mRoot=Root::getSingletonPtr();
+	OgreAssert(mRoot!=NULL,"Root is not yet generated, rendering will fail.");
+	this->entity=entity;
+	this->backBuffer=backBuffer;
+	semFinalRenderingRunPass=new SEMFinalRenderingRunPass(mRoot);
+	semFinalRenderingRunPass->addRenderTarget(backBuffer);
+	semFinalRenderingRunPass->changeTexture(textureName,0);
+}
+
+void SEMFinalRenderingRun::setEnvMapPostition(Vector3 envMapPosition){
+	semFinalRenderingRunPass->setEnvMapPostition(envMapPostion);
+}
+
+void SEMFinalRenderingRun::setSpecularColor(float specularColor){
+	semFinalRenderingRunPass->setSpecularColor(specularColor);
+}
+
+void SEMFinalRenderingRun::setShininess(float shininess){
+	semFinalRenderingRunPass->setShininess(shininess);
+}
+
+SEMFinalRenderingRun::~SEMFinalRenderingRun(void)
+{
+}
+
+void SEMFinalRenderingRun::update(void){
+	if(entity->isVisible()){
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		while(entityIterator.hasMoreElements()){
+			Entity* entityTemp=entityIterator.getNext();
+			entityVisibilityList.push_back(entityTemp->isVisible());
+			entityTemp->setVisible(false);
+		}
+		entity->setVisible(true);
+
+		semFinalRenderingRunPass->update();
+		
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		int elementNumber=0;
+		while(entityIterator.hasMoreElements()){
+			Entity* entity=entityIterator.getNext();
+			entity->setVisible(entityVisibilityList.at(elementNumber));
+			elementNumber++;
+		}
+		entityVisibilityList.clear();
+	}
+}
Index: trunk/BUTE/src/FinalRenderingRuns/DEMFinalRenderingRun.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/DEMFinalRenderingRun.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/DEMFinalRenderingRun.cpp	(revision 125)
@@ -0,0 +1,48 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "DEMFinalGatheringPass.h"
+#include "DEMFinalRenderingRun.h"
+
+DEMFinalRenderingRun::DEMFinalRenderingRun(Entity* entity)
+{	
+	Root* mRoot=Root::getSingletonPtr();
+	OgreAssert(mRoot!=NULL,"Root is not yet generated, rendering will fail.");
+	this->entity=entity;
+	demFinalRenderingRunPass=new DEMFinalGatheringPass(mRoot);
+}
+
+void DEMFinalRenderingRun::setEnvMapPostition(Vector3 envMapPosition){
+	demFinalRenderingRunPass->setEnvMapPostition(envMapPostion);
+}
+
+void DEMFinalRenderingRun::setDiffuseColor(float diffuseColor){
+	demFinalRenderingRunPass->setDiffuseColor(diffuseColor);
+}
+
+DEMFinalRenderingRun::~DEMFinalRenderingRun(void)
+{
+}
+
+void DEMFinalRenderingRun::update(void){
+	if(entity->isVisible()){
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		while(entityIterator.hasMoreElements()){
+			Entity* entityTemp=entityIterator.getNext();
+			entityVisibilityList.push_back(entityTemp->isVisible());
+			entityTemp->setVisible(false);
+		}
+		entity->setVisible(true);
+
+		demFinalRenderingRunPass->update();
+		
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		int elementNumber=0;
+		while(entityIterator.hasMoreElements()){
+			Entity* entity=entityIterator.getNext();
+			entity->setVisible(entityVisibilityList.at(elementNumber));
+			elementNumber++;
+		}
+		entityVisibilityList.clear();
+	}
+}
Index: trunk/BUTE/src/FinalRenderingRuns/FEMFinalRenderingRun.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/FEMFinalRenderingRun.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/FEMFinalRenderingRun.cpp	(revision 125)
@@ -0,0 +1,52 @@
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "managedogrerendertexturepass.h"
+#include "FEMFinalRenderingRunpass.h"
+#include "FEMFinalRenderingRun.h"
+
+FEMFinalRenderingRun::FEMFinalRenderingRun(Entity* entity,RenderTarget* backBuffer,const String& textureName)
+{	
+	
+	Root* mRoot=Root::getSingletonPtr();
+	OgreAssert(mRoot!=NULL,"Root is not yet generated, rendering will fail.");
+	this->entity=entity;
+	this->backBuffer=backBuffer;
+	FEMFinalRenderingRunPass=new FEMFinalRenderingRunPass(mRoot);
+	FEMFinalRenderingRunPass->addRenderTarget(backBuffer);
+	FEMFinalRenderingRunPass->changeTexture(textureName,0);
+}
+
+void FEMFinalRenderingRun::setEnvMapPostition(Vector3 envMapPosition){
+	FEMFinalRenderingRunPass->setEnvMapPostition(envMapPostion);
+}
+
+void FEMFinalRenderingRun::setFresnelFactor(float fresnelFactor){
+	FEMFinalRenderingRunPass->setFresnelFactor(fresnelFactor);
+}
+
+FEMFinalRenderingRun::~FEMFinalRenderingRun(void)
+{
+}
+
+void FEMFinalRenderingRun::update(void){
+	if(entity->isVisible()){
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		while(entityIterator.hasMoreElements()){
+			Entity* entityTemp=entityIterator.getNext();
+			entityVisibilityList.push_back(entityTemp->isVisible());
+			entityTemp->setVisible(false);
+		}
+		entity->setVisible(true);
+
+		FEMFinalRenderingRunPass->update();
+		
+		SceneManager::EntityIterator entityIterator=mSceneMgr->getEntityIterator();
+		int elementNumber=0;
+		while(entityIterator.hasMoreElements()){
+			Entity* entity=entityIterator.getNext();
+			entity->setVisible(entityVisibilityList.at(elementNumber));
+			elementNumber++;
+		}
+		entityVisibilityList.clear();
+	}
+}
Index: trunk/BUTE/src/FinalRenderingRuns/VRMRenderFinalPass.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/VRMRenderFinalPass.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/VRMRenderFinalPass.cpp	(revision 125)
@@ -0,0 +1,36 @@
+//	author:	Barnabas Aszodi (BME-IIT)
+
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "ManagedOgreRenderTexturePass.h"
+#include "VRMRenderFinalPass.h"
+
+
+VRMRenderFinalPass::VRMRenderFinalPass(
+			Root* mRoot):ManagedOgreRenderTexturePass(mRoot, ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
+{
+	effectWrapper->createMaterial("VRMRenderFinalPass");
+}
+
+void VRMRenderFinalPass::onRenderStart(NameValuePairList* namedParams){
+	effectWrapper->SetTechniqueToUse(0);
+	effectWrapper->BeginPass();
+	effectWrapper->SetVertexProgramParameters();
+	effectWrapper->SetMatrix("g_mWorldViewProj",g_mWorldViewProj);
+}
+
+
+void VRMRenderFinalPass::onRenderEnd(NameValuePairList* namedParams)
+{
+	effectWrapper->EndPass();
+}
+
+Matrix4 VRMRenderFinalPass::getWorldViewProj()
+{
+	return g_mWorldViewProj;
+}
+
+void VRMRenderFinalPass::setWorldViewProj( Matrix4 matrix4 )
+{
+	g_mWorldViewProj = matrix4;
+}
Index: trunk/BUTE/src/FinalRenderingRuns/CausticFinalRenderingRun.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/CausticFinalRenderingRun.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/CausticFinalRenderingRun.cpp	(revision 125)
@@ -0,0 +1,37 @@
+//	author:	Barnabas Aszodi (BME-IIT)
+
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "ManagedOgreRenderTexturePass.h"
+#include "FinalRenderingRun.h"
+
+#include "CAURenderFinalPass.h"
+
+#include "CausticFinalRenderingRun.h"
+
+
+CausticFinalRenderingRun::CausticFinalRenderingRun(Entity* entity)
+		:FinalRenderingRun(entity)
+{
+	iCausticMapUpdateInterval = 0;
+}
+
+
+void CausticFinalRenderingRun::renderSingleEntity(RenderTarget* backBuffer, CubeMapFaces cf)
+{
+}
+
+const String& CausticFinalRenderingRun::getCausticMapTexture()
+{
+	return this->cAURenderFinalPass->getMaterialName();
+}
+
+unsigned int CausticFinalRenderingRun::getCausticMapUpdateInterval()
+{
+	return iCausticMapUpdateInterval;
+}	
+
+void CausticFinalRenderingRun::setCausticMapUpdateInterval(unsigned int updateIntervalNumOfFrames)
+{
+	iCausticMapUpdateInterval = updateIntervalNumOfFrames;
+}
Index: trunk/BUTE/src/FinalRenderingRuns/CAURenderFinalPass.cpp
===================================================================
--- trunk/BUTE/src/FinalRenderingRuns/CAURenderFinalPass.cpp	(revision 125)
+++ trunk/BUTE/src/FinalRenderingRuns/CAURenderFinalPass.cpp	(revision 125)
@@ -0,0 +1,36 @@
+//	author:	Barnabas Aszodi (BME-IIT)
+
+#include "Ogre.h"
+#include "OgreEffectWrapper.h"
+#include "ManagedOgreRenderTexturePass.h"
+#include "CAURenderFinalPass.h"
+
+
+CAURenderFinalPass::CAURenderFinalPass(
+			Root* mRoot):ManagedOgreRenderTexturePass(mRoot, ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
+{
+	effectWrapper->createMaterial("CAURenderFinalPass");
+}
+
+void CAURenderFinalPass::onRenderStart(NameValuePairList* namedParams){
+	effectWrapper->SetTechniqueToUse(0);
+	effectWrapper->BeginPass();
+	effectWrapper->SetVertexProgramParameters();
+	effectWrapper->SetMatrix("g_mWorldViewProj",g_mWorldViewProj);
+}
+
+
+void CAURenderFinalPass::onRenderEnd(NameValuePairList* namedParams)
+{
+	effectWrapper->EndPass();
+}
+
+Matrix4 CAURenderFinalPass::getWorldViewProj()
+{
+	return g_mWorldViewProj;
+}
+
+void CAURenderFinalPass::setWorldViewProj( Matrix4 matrix4 )
+{
+	g_mWorldViewProj = matrix4;
+}
