Changeset 2265


Ignore:
Timestamp:
03/19/07 16:53:07 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/Lib/Illum/IllumModule
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/IllumModule/src/RenderingRuns/CubeMapRenderingRun.cpp

    r1722 r2265  
    2929void CubeMapRenderingRun::updateFrame(unsigned long frameNum) 
    3030{ 
    31         if(updateAllFace) 
     31        if(updateAllFace || updateInterval == 0) 
    3232        { 
    3333                for(int i=0;i<6;i++) 
     
    3838        else 
    3939        { 
    40                 if(lastupdated == 0 && updateInterval == 0) 
    41                 { 
    42                         for(int i=0;i<6;i++) 
    43                         { 
    44                                 updateCubeFace(i); 
    45                         } 
    46                 } 
    47                 else 
    48                 { 
    49                         if(faceNeedsUpdate(currentFace)) 
    50                                 updateCubeFace(currentFace); 
     40                if(faceNeedsUpdate(currentFace)) 
     41                        updateCubeFace(currentFace); 
    5142 
    52                         currentFace = (currentFace + 1) % 6; 
    53                 } 
     43                currentFace = (currentFace + 1) % 6;             
    5444        } 
    5545} 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp

    r2240 r2265  
    430430                fillVisibleList(rq);     
    431431 
    432 //              int l = visibleObjects.size(); //debug 
     432                int l = visibleObjects.size(); //debug 
    433433                 
    434434                joinSharedRuns(); 
    435435 
    436 //              int ll = sharedRunRoots.size(); //debug 
     436                int ll = sharedRunRoots.size(); //debug 
    437437 
    438438                //update precomputings                           
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp

    r2180 r2265  
    111111                rt->setAutoUpdated(false); 
    112112                v->setBackgroundColour(clearColor); 
     113                Root::getSingleton()._getCurrentSceneManager()->getRenderQueue()->clear(); 
     114                Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(false); 
     115        rt->update(); 
     116                Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(true); 
    113117                 
    114118                Root::getSingleton().getRenderSystem()->_setViewport(v); 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreSharedRuns.cpp

    r1722 r2265  
    6767                sharedRuns[runType]->update(frameNum); 
    6868        */ 
    69         RenderingRun* run = getRun(runType); 
     69        RenderingRun* run = getRoot(runType)->getRun(runType); 
    7070         
    7171        if(run->update(frameNum)) 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp

    r2200 r2265  
    256256        photonMapResolution = 64; 
    257257        causticCubeMapResolution = 128;  
    258         photonMapMaterialName = "GameTools/PhotonMapCaustic"; 
    259         causticMapMaterialName = "GameTools/Cau"; 
     258        photonMapMaterialName = "GTP/Caustic/PhotonMap_HitEnv"; 
     259        causticMapMaterialName = "GTP/Caustic/CauCube_PointSprite"; 
    260260        photonMapTexID = 0; 
    261261        useDistance = true; 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp

    r2055 r2265  
    4949                                                                        GpuProgramParameters::ACT_WORLD_MATRIX); 
    5050                GpuProgramParameters* Fparams = newpass->getFragmentProgramParameters().getPointer(); 
    51                 Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0)); 
     51                //Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0)); 
    5252 
    5353                TextureUnitState* st = newpass->createTextureUnitState(); 
     
    5959                newpass->setSceneBlending(SBF_DEST_COLOUR, SBF_ONE); 
    6060                //newpass->setSceneBlending(SBF_ONE, SBF_ZERO); 
    61                 newpass->setDepthBias(5); 
     61                newpass->setDepthBias(1); 
    6262                //newpass->setSceneBlending(SBT_ADD); 
    6363                 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp

    r1956 r2265  
    105105        OgreCubeMapRenderTechniqueFactory::resetParams(); 
    106106        texID = 1; 
    107         environmentMaterial = "GameTools/DistanceShader"; 
    108         selfMaterial = "GameTools/DistanceShader"; 
     107        environmentMaterial = "GTP/Basic/Distance"; 
     108        selfMaterial = "GTP/Basic/Distance"; 
    109109        OgreCubeMapRenderTechniqueFactory::parseParams(params);  
    110110        parseParams(params); 
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp

    r2180 r2265  
    8383                        if(useEnvMaterial) 
    8484                        { 
    85 ///////////////////////////////////////////////////////////////// 
    86 ////   DEBUG 
    87 ///////////////////////////////////////////////////////////////// 
    88 /*              Camera* camm = new Camera("tempCAm", sm); 
    89                 TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual(  "tempRT",  
    90                                                                                                                                                         "default", 
    91                                                                                                                                                         TEX_TYPE_2D, 
    92                                                                                                                                                         256, 
    93                                                                                                                                                         256, 
    94                                                                                                                                                         0, 
    95                                                                                                                                                         0, 
    96                                                                                                                                                         PF_FLOAT16_RGBA, 
    97                                                                                                                                                         TU_RENDERTARGET); 
    98                 camm->setPosition(0,50,0); 
    99                 camm->setAspectRatio(1); 
    100                 camm->setFOVy(Radian(Degree(90))); 
    101                 camm->setNearClipDistance(0.1); 
    102                 camm->setFarClipDistance(1000); 
    103                 Texture* result = texPtr.getPointer(); 
    104                 HardwarePixelBuffer* hpb = (result->getBuffer()).getPointer(); 
    105                 RenderTarget* rt = hpb->getRenderTarget(0); 
    106                 Viewport* v = rt->addViewport(camm); 
    107                 v->setOverlaysEnabled(false); 
    108                 rt->setAutoUpdated(false); 
    109                  
    110                 int cnt = sm->_findVisibleObjectsOC(camm, v, false, true, false); 
    111                 int cnt2 = sm->_findVisibleObjectsOC(cam, v, false, true, false); 
    112                 int cnt3 = sm->_findVisibleObjectsOC(camm, cam->getViewport(), false, true, false); 
    113                 int cnt3 = sm->_findVisibleObjectsOC(cam, cam->getViewport(), false, true, false);*/ 
    114 /////////////////////////////////////////////////// 
    11585                                setMaterialForVisibles(environmentMaterial, cam); 
    11686                                //sm->_queueSkiesForRendering(cam);                              
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreFocusingMapRenderingRun.cpp

    r1425 r2265  
    106106         
    107107         
    108         MaterialPtr mat = MaterialManager::getSingleton().getByName("GameTools/FocusingShader"); 
     108        MaterialPtr mat = MaterialManager::getSingleton().getByName("GTP/Basic/Focusing"); 
    109109        GpuProgramParameters* Vparams = mat->getTechnique(0)->getPass(0)->getVertexProgramParameters().getPointer(); 
    110         Vparams->setNamedConstant("lightTransform", lightMatrix); 
     110        Vparams->setNamedConstant("LightViewProj", lightMatrix); 
    111111                 
    112         setMaterialForVisibles(String("GameTools/FocusingShader"), camera); 
     112        setMaterialForVisibles(String("GTP/Basic/Focusing"), camera); 
    113113 
    114114        RenderTarget* rt = focusingTexture->getBuffer().getPointer()->getRenderTarget(); 
Note: See TracChangeset for help on using the changeset viewer.