- Timestamp:
- 03/05/07 18:05:16 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDepthShadowRecieverRenderTechnique.cpp
r2180 r2189 66 66 67 67 TextureUnitState* st = newpass->createTextureUnitState(); 68 st->setTextureFiltering(TFO_ ANISOTROPIC);68 st->setTextureFiltering(TFO_NONE); 69 69 st->setTextureAddressingMode(TextureUnitState::TAM_BORDER); 70 70 st->setTextureBorderColour(ColourValue::White); -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgrePathMapRenderTechnique.cpp
r2185 r2189 2 2 #include "OgreTechniqueGroup.h" 3 3 #include "OgreIlluminationManager.h" 4 #include "OgrePMWeightComputeRenderingRun.h" 5 4 6 5 7 … … 10 12 :RenderTechnique( parentRenderable, parentTechniqueGroup), 11 13 OgreRenderTechnique(pass, parentRenderable, parentTechniqueGroup) 12 { 14 { 13 15 this->clusters = OgreIlluminationManager::getSingleton().getPathMapClusters(parentRenderable->getName()); 14 16 … … 26 28 } 27 29 28 Pass* newpass = techn->createPass();30 Pass* newpass = pathMapPass = techn->createPass(); 29 31 30 32 newpass->setVertexProgram("GTP/PathMap_VS"); … … 46 48 47 49 float halfPixel[2] = {0.5 / prmxres, 0.5 / prmyres}; 48 Fparams->setNamedConstant("prmAtlasTiles",prmnt,2);49 Fparams->setNamedConstant("atlasHalfPixel", halfPixel, 2);50 50 Vector4 pathMapParameters(prmnt[0],prmnt[1],halfPixel[0],halfPixel[1]); 51 Fparams->setNamedConstant("prmAtlasTilesHalfPixel",pathMapParameters); 52 51 53 TextureUnitState* st = newpass->createTextureUnitState(); 52 54 st->setTextureFiltering(TFO_BILINEAR); … … 54 56 st->setTextureBorderColour(ColourValue::Blue); 55 57 st->setTextureName(clusters->pathMapTextureFilename); 56 58 57 59 //newpass->setSceneBlending(SBT_MODULATE); 58 60 newpass->setSceneBlending(SBF_ONE, SBF_ZERO); 61 newpass->setDepthBias(1); 62 59 63 60 newpass->setDepthBias(1);64 61 65 } 62 66 … … 68 72 void OgrePathMapRenderTechnique::update(unsigned long frameNum) 69 73 { 70 //TODO set weights 74 LightList lights; 75 SceneManager* sm = Root::getSingleton()._getCurrentSceneManager(); 76 sm->_populateLightList(Vector3(0,0,0), 1000, lights); //TODO 77 //TODO set weights 78 PathMapClusters* clusters = OgreIlluminationManager::getSingleton().getPathMapClusters(parentOgreRenderable->getName()); 79 float *actualWeights = new float[clusters->count];//TODO = 0 80 for(int i = 0 ; i < 1; i++) 81 { 82 String lightName = lights.at(0)->getName(); 83 OgreIlluminationManager::getSingleton().createPerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP); 84 OgreIlluminationManager::getSingleton().updatePerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP, frameNum); 85 OgrePMWeightComputeRenderingRun* PMWeightRun = (OgrePMWeightComputeRenderingRun*) 86 OgreIlluminationManager::getSingleton().getPerLightRun(lightName, ILLUMRUN_PM_WEIGHTMAP)->asOgreRenderingRun(); 87 88 float* weights = PMWeightRun->getWeights(); 89 90 for(int j = 0; j< clusters->count; j++) 91 actualWeights[j] = weights[clusters->clusters[j]]; 92 93 } 94 95 GpuProgramParameters* Fparams = pathMapPass->getFragmentProgramParameters().getPointer(); 96 Fparams->setNamedConstant("weights", actualWeights, clusters->count); 71 97 } 72 98
Note: See TracChangeset
for help on using the changeset viewer.