[125] | 1 | #include "Ogre.h"
|
---|
| 2 | #include "OgreEffectWrapper.h"
|
---|
| 3 | #include "managedogrerendertexturepass.h"
|
---|
| 4 | #include "SEMFinalGatheringPass.h"
|
---|
| 5 |
|
---|
| 6 | SEMFinalGatheringPass::SEMFinalGatheringPass(Root* mRoot)
|
---|
| 7 | :ManagedOgreRenderTexturePass(mRoot,ManagedOgreRenderTexturePass::noRenderTargetName,1,1)
|
---|
| 8 | {
|
---|
| 9 | setMaterialName("EnvMap/EnvMapMaterial");
|
---|
| 10 | }
|
---|
| 11 |
|
---|
| 12 | SEMFinalGatheringPass::~SEMFinalGatheringPass(void)
|
---|
| 13 | {
|
---|
| 14 |
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | void SEMFinalGatheringPass::onRenderStart(NameValuePairList* namedParams){
|
---|
| 18 | effectWrapper->SetTechniqueToUse(0);
|
---|
| 19 | effectWrapper->BeginPass();
|
---|
| 20 | effectWrapper->SetVector3("g_EyePos",renderTargets.at(0)->getViewport(0)->getCamera()->getPosition());
|
---|
| 21 | effectWrapper->SetVector3("g_EnvMapPos",this->envMapPosition);
|
---|
| 22 | effectWrapper->SetVector3("g_SpecularColor",this->specularColor);
|
---|
| 23 | effectWrapper->SetFloat("g_Shininess",this->shininess);
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | void SEMFinalGatheringPass::onRenderEnd(NameValuePairList* namedParams){
|
---|
| 27 | effectWrapper->EndPass();
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | void SEMFinalGatheringPass::setEnvMapPostition(Vector3 envMapPosition){
|
---|
| 31 | this->envMapPosition=envMapPosition;
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | void SEMFinalGatheringPass::setSpecularColor(Vector3 specularColor){
|
---|
| 35 | this->specularColor = specularColor;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | void SEMFinalGatheringPass::setShininess(float shininess){
|
---|
| 39 | this->shininess=shininess;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | void SEMFinalGatheringPass::update(){
|
---|
| 43 | } |
---|