Changeset 2265 for GTP/trunk/Lib/Illum
- Timestamp:
- 03/19/07 16:53:07 (18 years ago)
- 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 29 29 void CubeMapRenderingRun::updateFrame(unsigned long frameNum) 30 30 { 31 if(updateAllFace )31 if(updateAllFace || updateInterval == 0) 32 32 { 33 33 for(int i=0;i<6;i++) … … 38 38 else 39 39 { 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); 51 42 52 currentFace = (currentFace + 1) % 6; 53 } 43 currentFace = (currentFace + 1) % 6; 54 44 } 55 45 } -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp
r2240 r2265 430 430 fillVisibleList(rq); 431 431 432 //int l = visibleObjects.size(); //debug432 int l = visibleObjects.size(); //debug 433 433 434 434 joinSharedRuns(); 435 435 436 //int ll = sharedRunRoots.size(); //debug436 int ll = sharedRunRoots.size(); //debug 437 437 438 438 //update precomputings -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp
r2180 r2265 111 111 rt->setAutoUpdated(false); 112 112 v->setBackgroundColour(clearColor); 113 Root::getSingleton()._getCurrentSceneManager()->getRenderQueue()->clear(); 114 Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(false); 115 rt->update(); 116 Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(true); 113 117 114 118 Root::getSingleton().getRenderSystem()->_setViewport(v); -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreSharedRuns.cpp
r1722 r2265 67 67 sharedRuns[runType]->update(frameNum); 68 68 */ 69 RenderingRun* run = getR un(runType);69 RenderingRun* run = getRoot(runType)->getRun(runType); 70 70 71 71 if(run->update(frameNum)) -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp
r2200 r2265 256 256 photonMapResolution = 64; 257 257 causticCubeMapResolution = 128; 258 photonMapMaterialName = "G ameTools/PhotonMapCaustic";259 causticMapMaterialName = "G ameTools/Cau";258 photonMapMaterialName = "GTP/Caustic/PhotonMap_HitEnv"; 259 causticMapMaterialName = "GTP/Caustic/CauCube_PointSprite"; 260 260 photonMapTexID = 0; 261 261 useDistance = true; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticRecieverRenderTechnique.cpp
r2055 r2265 49 49 GpuProgramParameters::ACT_WORLD_MATRIX); 50 50 GpuProgramParameters* Fparams = newpass->getFragmentProgramParameters().getPointer(); 51 Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0));51 //Fparams->setNamedConstant("cubeMapCameraPosition", Vector3(0,0,0)); 52 52 53 53 TextureUnitState* st = newpass->createTextureUnitState(); … … 59 59 newpass->setSceneBlending(SBF_DEST_COLOUR, SBF_ONE); 60 60 //newpass->setSceneBlending(SBF_ONE, SBF_ZERO); 61 newpass->setDepthBias( 5);61 newpass->setDepthBias(1); 62 62 //newpass->setSceneBlending(SBT_ADD); 63 63 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp
r1956 r2265 105 105 OgreCubeMapRenderTechniqueFactory::resetParams(); 106 106 texID = 1; 107 environmentMaterial = "G ameTools/DistanceShader";108 selfMaterial = "G ameTools/DistanceShader";107 environmentMaterial = "GTP/Basic/Distance"; 108 selfMaterial = "GTP/Basic/Distance"; 109 109 OgreCubeMapRenderTechniqueFactory::parseParams(params); 110 110 parseParams(params); -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp
r2180 r2265 83 83 if(useEnvMaterial) 84 84 { 85 /////////////////////////////////////////////////////////////////86 //// DEBUG87 /////////////////////////////////////////////////////////////////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 ///////////////////////////////////////////////////115 85 setMaterialForVisibles(environmentMaterial, cam); 116 86 //sm->_queueSkiesForRendering(cam); -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreFocusingMapRenderingRun.cpp
r1425 r2265 106 106 107 107 108 MaterialPtr mat = MaterialManager::getSingleton().getByName("G ameTools/FocusingShader");108 MaterialPtr mat = MaterialManager::getSingleton().getByName("GTP/Basic/Focusing"); 109 109 GpuProgramParameters* Vparams = mat->getTechnique(0)->getPass(0)->getVertexProgramParameters().getPointer(); 110 Vparams->setNamedConstant(" lightTransform", lightMatrix);110 Vparams->setNamedConstant("LightViewProj", lightMatrix); 111 111 112 setMaterialForVisibles(String("G ameTools/FocusingShader"), camera);112 setMaterialForVisibles(String("GTP/Basic/Focusing"), camera); 113 113 114 114 RenderTarget* rt = focusingTexture->getBuffer().getPointer()->getRenderTarget();
Note: See TracChangeset
for help on using the changeset viewer.