- Timestamp:
- 05/15/07 11:46:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp
r2366 r2375 84 84 //updateDepthCubeFace(currentFace); 85 85 //currentFace = (currentFace+1)%6; 86 87 88 //Timer* t = Root::getSingleton().getTimer(); 89 //unsigned long start = t->getMicroseconds(); 90 //setMaterialForRenderables(materialName, true); 91 //unsigned long end = t->getMicroseconds(); 92 //double elapsed = (double) (end - start) / 1000.0; 93 //LogManager::getSingleton().logMessage(String("MaterialSetTime: ") + name + " : " + StringConverter::toString(Real(elapsed)) + " ms"); 94 //visibleObjects.clear(); 86 95 87 96 for(int i = 0; i < 6 ; i++) 88 97 updateDepthCubeFace(i); 98 99 //start = t->getMicroseconds(); 100 101 restoreMaterials(); 102 103 //end = t->getMicroseconds(); 104 //elapsed = (double) (end - start) / 1000000.0; 105 //LogManager::getSingleton().logMessage(String("MaterialRestoreTime: ") + name + " : " + StringConverter::toString(Real(elapsed)) + " ms"); 89 106 } 90 107 else … … 95 112 96 113 void OgreDepthShadowMapRenderingRun::updateDepthCubeFace(int facenum) 97 { 114 { 115 Vector3 lightpos = light->getDerivedPosition(); 98 116 String triggerName = "ILLUM_TRIGGER_SM_POINT"; 99 100 Vector3 lightpos = light->getDerivedPosition(); 101 117 102 118 RenderTarget* rt = depthMapTexture->getBuffer(facenum, 0).getPointer()->getRenderTarget(); 103 119 Camera* cam = rt->getViewport(0)->getCamera(); 104 cam->setPosition(lightpos);105 120 cam->setFarClipDistance(lightFarPlane); 106 121 cam->setPosition(lightpos); 122 123 107 124 setMaterialForVisibles(materialName, cam, true, false, triggerName); 125 108 126 rt->update(); 109 restoreMaterials(); 110 127 128 // restoreMaterials(); 129 111 130 //rt->writeContentsToFile("shadowmap_" + StringConverter::toString(facenum) + ".dds"); 112 131 … … 120 139 121 140 //rt->writeContentsToFile("shadowmap_blurred_" + StringConverter::toString(facenum) + ".dds"); 122 } 123 141 } 124 142 } 125 143
Note: See TracChangeset
for help on using the changeset viewer.