Ignore:
Timestamp:
05/11/06 10:19:54 (19 years ago)
Author:
szirmay
Message:
 
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  
    2121        this->materialName =  materialName; 
    2222        this->photonMapTexId = photonMapTexId; 
     23 
     24        spriteSetName = name + String("_pixelSpriteSet"); 
    2325         
    2426        createCausticCubeMap(); 
     
    4042        String photonMapName = ((OgrePhotonMapRenderingRun*) run->asOgreRenderingRun())->getPhotonMapTextureName(); 
    4143        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()); 
    4247} 
    4348 
     
    5964        renderPixelSprites(materialName, rt, tex->getWidth(), tex->getHeight()); 
    6065 
    61         //rt->writeContentsToFile("caucube" + StringConverter::toString(facenum) + ".dds"); 
     66        //rt->writeContentsToFile("caucube" + this->name + StringConverter::toString(facenum) + ".dds"); 
    6267} 
    6368 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePhotonMapRenderingRun.cpp

    r808 r949  
    7878        static int framecount = 0; 
    7979        String filename = "photon"; 
    80         filename.append(StringConverter::toString(framecount)); 
     80        filename.append(this->name); 
     81        //filename.append(StringConverter::toString(framecount)); 
    8182        filename.append(".png"); 
    8283        rt->writeContentsToFile(filename); 
     
    135136        mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(cubemapname); 
    136137} 
     138 
     139void 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} 
    137148  
Note: See TracChangeset for help on using the changeset viewer.