#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(){ }