- Timestamp:
- 05/11/06 10:19:54 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCausticCubeMapRenderingRun.cpp
r790 r949 21 21 this->materialName = materialName; 22 22 this->photonMapTexId = photonMapTexId; 23 24 spriteSetName = name + String("_pixelSpriteSet"); 23 25 24 26 createCausticCubeMap(); … … 40 42 String photonMapName = ((OgrePhotonMapRenderingRun*) run->asOgreRenderingRun())->getPhotonMapTextureName(); 41 43 mat->getTechnique(0)->getPass(0)->getTextureUnitState(photonMapTexId)->setTextureName(photonMapName); 44 45 //rt = TextureManager::getSingleton().getByName(photonMapName); 46 LogManager::getSingleton().logMessage(LML_NORMAL, name + " map: " + photonMapName + " material: " + mat->getName()); 42 47 } 43 48 … … 59 64 renderPixelSprites(materialName, rt, tex->getWidth(), tex->getHeight()); 60 65 61 //rt->writeContentsToFile("caucube" + StringConverter::toString(facenum) + ".dds");66 //rt->writeContentsToFile("caucube" + this->name + StringConverter::toString(facenum) + ".dds"); 62 67 } 63 68 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp
r808 r949 78 78 static int framecount = 0; 79 79 String filename = "photon"; 80 filename.append(StringConverter::toString(framecount)); 80 filename.append(this->name); 81 //filename.append(StringConverter::toString(framecount)); 81 82 filename.append(".png"); 82 83 rt->writeContentsToFile(filename); … … 135 136 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(cubemapname); 136 137 } 138 139 void OgrePhotonMapRenderingRun::distanceCubeMapUpdated(RenderingRun* run) 140 { 141 Material* mat = (Material*) MaterialManager::getSingleton().getByName(materialName).getPointer(); 142 OgreDistanceCubeMapRenderingRun* cuberun =(OgreDistanceCubeMapRenderingRun*) (run->asOgreRenderingRun()); 143 String cubemapname = cuberun->getDistanceCubeMapTextureName(); 144 GpuProgramParametersSharedPtr fpParams = mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters(); 145 Vector3 center = ((OgreSharedRuns*) sharedRuns)->getRootPosition(ILLUMRUN_DISTANCE_CUBEMAP); 146 fpParams->setNamedConstant("lastCenter",center); 147 } 137 148
Note: See TracChangeset
for help on using the changeset viewer.