Changeset 2406 for GTP/trunk/Lib/Illum
- Timestamp:
- 06/05/07 02:00:52 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDepthShadowReceiverRenderTechnique.cpp
r2397 r2406 101 101 for(unsigned int i = 0; i < maxlights; i++) 102 102 { 103 while(lights.size() != l && !lights.at(l)->getCastShadows()) 104 l++; 105 106 if(lights.size() > l) 103 int lightcount = lights.size(); 104 while( lightcount > l) 105 { 106 if(!lights.at(l)->getCastShadows()) 107 l++; 108 else 109 break; 110 } 111 112 if(lightcount > l) 107 113 { 108 114 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgrePathMapRenderTechnique.cpp
r2397 r2406 52 52 GpuProgramParameters* Fparams = passToSet->getFragmentProgramParameters().getPointer(); 53 53 54 int prmxres = clusters->pathMapResolution *clusters->count;55 int prmyres = clusters->pathMapResolution;54 int prmxres = this->clusters->pathMapResolution * this->clusters->count; 55 int prmyres = this->clusters->pathMapResolution; 56 56 while(prmxres > 4096) 57 57 { … … 59 59 prmyres *= 2; 60 60 } 61 int prmnt[2] = {prmxres / clusters->pathMapResolution, prmyres /clusters->pathMapResolution};61 int prmnt[2] = {prmxres / this->clusters->pathMapResolution, prmyres / this->clusters->pathMapResolution}; 62 62 63 63 float halfPixel[2] = {0.5 / prmxres, 0.5 / prmyres}; … … 80 80 st1 = passToSet->createTextureUnitState(); 81 81 st1->setTextureFiltering(TFO_BILINEAR); 82 st1->setTextureAddressingMode(TextureUnitState::TAM_ CLAMP);82 st1->setTextureAddressingMode(TextureUnitState::TAM_BORDER); 83 83 st1->setTextureBorderColour(ColourValue::Green); 84 84 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp
r2379 r2406 52 52 v->setBackgroundColour(ColourValue::White); 53 53 v->setOverlaysEnabled(false); 54 v->setSkiesEnabled(false); 54 55 rt->setAutoUpdated(false); 55 56 … … 77 78 bool OgreDepthShadowMapRenderingRun::renderableQueued (Renderable *rend, uint8 groupID, ushort priority, Technique **ppTech) 78 79 { 80 if((*ppTech)->isTransparent()) 81 return false; 82 83 String materialToSet = materialName; 79 84 OgreTechniqueGroup* TG = (OgreTechniqueGroup*) rend->getRenderTechniqueGroup(); 80 85 if(TG) 81 86 { 82 String materialToSet = materialName;83 87 String triggeredMaterial = TG->getMaterialNameForTrigger(triggerName); 84 88 if(triggeredMaterial != "")//a trigger is associated 85 89 materialToSet = triggeredMaterial; 86 Technique* techn = ((Material*)MaterialManager::getSingleton().getByName( materialToSet ).getPointer())->getTechnique(0);87 *ppTech = techn;88 90 } 91 Technique* techn = ((Material*)MaterialManager::getSingleton().getByName( materialToSet ).getPointer())->getTechnique(0); 92 *ppTech = techn; 89 93 return true; 90 94 } -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreSceneCameraDepthRenderingRun.cpp
r2379 r2406 38 38 Viewport* v = rt->addViewport(playerCamera); 39 39 v->setOverlaysEnabled(false); 40 v->setSkiesEnabled(false); 40 41 rt->setAutoUpdated(false); 41 42 } … … 46 47 return false; 47 48 49 String materialToSet = String("GTP/Basic/CameraDepth"); 48 50 OgreTechniqueGroup* TG = (OgreTechniqueGroup*) rend->getRenderTechniqueGroup(); 49 51 if(TG) 50 52 { 51 String materialToSet = String("GTP/Basic/CameraDepth");52 53 String triggeredMaterial = TG->getMaterialNameForTrigger("ILLUM_TRIGGER_CAMERADEPTH"); 53 54 if(triggeredMaterial != "")//a trigger is associated 54 55 materialToSet = triggeredMaterial; 55 Technique* techn = ((Material*)MaterialManager::getSingleton().getByName( materialToSet ).getPointer())->getTechnique(0);56 *ppTech = techn;57 56 } 57 58 Technique* techn = ((Material*)MaterialManager::getSingleton().getByName( materialToSet ).getPointer())->getTechnique(0); 59 *ppTech = techn; 58 60 return true; 59 61 }
Note: See TracChangeset
for help on using the changeset viewer.