- Timestamp:
- 05/28/07 16:30:37 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDepthShadowReceiverRenderTechnique.cpp
r2372 r2397 19 19 SceneBlendFactor passBlendingDEST, 20 20 bool createNewPasses, 21 int startTextureUnitID, 21 int startTextureUnitID, 22 bool nearestLightsFromCamera, 22 23 Pass* pass, 23 24 OgreRenderable* parentRenderable, … … 42 43 this->createNewPasses = createNewPasses; 43 44 this->startTextureUnitID = startTextureUnitID; 45 46 this->nearestLightsFromCamera = nearestLightsFromCamera; 44 47 45 48 if(createNewPasses) … … 86 89 { 87 90 LightList lights; 91 Vector3 center = OgreIlluminationManager::getSingleton().getMainCamera()->getWorldPosition(); 92 if(!nearestLightsFromCamera) 93 center = ((OgreSharedRuns*) sharedRuns)->getRootPosition(); 88 94 Root::getSingleton()._getCurrentSceneManager()->_populateLightList( 89 ((OgreSharedRuns*) sharedRuns)->getRootPosition(),95 center, 90 96 100000.0, 91 97 lights); … … 336 342 f->startTextureUnitID = StringConverter::parseInt(params); 337 343 } 344 void parseNearestFromCamera(String& params, RenderTechniqueFactory* factory) 345 { 346 OgreDepthShadowReceiverRenderTechniqueFactory* f = (OgreDepthShadowReceiverRenderTechniqueFactory*) factory; 347 f->nearestLightsFromCamera = StringConverter::parseBool(params); 348 } 338 349 } 339 350 … … 358 369 this->attributeParsers.insert(AttribParserList::value_type("new_passes", (ILLUM_ATTRIBUTE_PARSER) parseCreateNewPasses)); 359 370 this->attributeParsers.insert(AttribParserList::value_type("start_tex_id", (ILLUM_ATTRIBUTE_PARSER) parseStartTexID)); 371 this->attributeParsers.insert(AttribParserList::value_type("nearest_from_camera", (ILLUM_ATTRIBUTE_PARSER) parseNearestFromCamera)); 360 372 } 361 373 … … 382 394 createNewPasses = true; 383 395 startTextureUnitID = 0; 396 nearestLightsFromCamera = true; 384 397 385 398 parseParams(params); … … 401 414 createNewPasses, 402 415 startTextureUnitID, 416 nearestLightsFromCamera, 403 417 pass, 404 418 parentRenderable, … … 408 422 } 409 423 424 bool OgreDepthShadowReceiverRenderTechniqueFactory::needMaterialCopy(IllumTechniqueParams* params) 425 { 426 nearestLightsFromCamera = true; 427 parseParams(params); 428 if(nearestLightsFromCamera) 429 return false; 430 else 431 return true; 432 } 433 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreHierarchicalParticleSystemTechnique.cpp
r1425 r2397 34 34 this->useVParam = useVParam; 35 35 this->useFParam = useFParam; 36 36 37 37 //create the Particle system 38 38 childPSysName = parentOgreRenderable->getName() + "_small_PSYS"; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgrePathMapRenderTechnique.cpp
r2366 r2397 23 23 24 24 this->clusters = OgreIlluminationManager::getSingleton().getPathMapClusters(parentRenderable->getName()); 25 26 25 Pass* passToSet = pass; 27 26 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreSBBRenderTechnique.cpp
r2379 r2397 6 6 7 7 OgreSBBRenderTechnique::OgreSBBRenderTechnique( unsigned char depthTexID, 8 bool bindTexture, 8 9 Pass* pass, 9 10 OgreRenderable* parentRenderable, … … 14 15 { 15 16 this->depthTexID = depthTexID; 17 this->bindTexture = bindTexture; 16 18 17 19 OgreIlluminationManager::getSingleton().createGlobalRun(ILLUMRUN_SCENE_CAMERA_DEPTH); … … 25 27 OgreIlluminationManager::getSingleton().addUpdateListener(this); 26 28 29 if(bindTexture) 27 30 pass->getTextureUnitState(depthTexID)->setTextureName(run->getDepthTextureName()); 28 31 … … 70 73 f->depthTexID = StringConverter::parseUnsignedInt(params); 71 74 } 75 void parseBindTexture(String& params, RenderTechniqueFactory* factory) 76 { 77 OgreSBBRenderTechniqueFactory* f = (OgreSBBRenderTechniqueFactory*) factory; 78 f->bindTexture = StringConverter::parseBool(params); 79 } 72 80 } 73 81 … … 80 88 //register parsers 81 89 this->attributeParsers.insert(AttribParserList::value_type("texture_unit_id", (ILLUM_ATTRIBUTE_PARSER) parseDepthTexID)); 90 this->attributeParsers.insert(AttribParserList::value_type("bind_texture", (ILLUM_ATTRIBUTE_PARSER) parseBindTexture)); 82 91 } 83 92 … … 90 99 //reset parameters 91 100 depthTexID = 1; 92 101 bindTexture = true; 102 93 103 parseParams(params); 94 104 95 105 OgreSBBRenderTechnique* result = new OgreSBBRenderTechnique( 96 106 depthTexID, 107 bindTexture, 97 108 pass, 98 109 parentRenderable,
Note: See TracChangeset
for help on using the changeset viewer.