Changeset 2420 for GTP/trunk/Lib
- Timestamp:
- 06/06/07 19:20:26 (17 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h
r2397 r2420 48 48 */ 49 49 float prob; 50 int clusterID; 50 51 }; 51 52 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePMEntryPointMapRenderingRun.cpp
r2321 r2420 66 66 67 67 float* data = new float[clusterCount * 2]; 68 unsigned int entryPointCount = 0;68 unsigned int clusterStartEntryPoint = 0; 69 69 for(int i = 0; i < clusterCount; i++) 70 70 { 71 71 unsigned int clusterSize = OgreIlluminationManager::getSingleton().getPathMapClusterLength(i); 72 72 data[i] = clusterSize;//clustercount 73 data[clusterCount + i] = entryPointCount; 74 entryPointCount += clusterSize; 73 data[clusterCount + i] = clusterStartEntryPoint; 74 for(int j = 0; j < clusterSize; j++) 75 { 76 PathMapEntryPoint* EP = &OgreIlluminationManager::getSingleton().getPathMapEntryPoints().at(clusterStartEntryPoint + j); 77 EP->clusterID = i; 78 } 79 clusterStartEntryPoint += clusterSize; 75 80 } 76 81 … … 79 84 80 85 delete[] data; 86 87 if(false) 88 { 89 SceneManager* sm = Root::getSingleton()._getCurrentSceneManager(); 90 BillboardSet* bbs = sm->createBillboardSet("WEIGHT_DEBUG", 4096); 91 bbs->setDefaultDimensions(0.1, 0.1); 92 for(int i= 0; i < entryPointCnt;i++) 93 { 94 PathMapEntryPoint* EP = &OgreIlluminationManager::getSingleton().getPathMapEntryPoints().at(i); 95 int r = i / 256; 96 int g = i - r * 256; 97 float rr = (float) r / 256.0; 98 float gg = (float) g / 256.0; 99 100 ColourValue c; 101 c = ColourValue(rr, gg, 0); 102 /*c = ColourValue( 103 Math::Ceil(Math::Floor(EP->position.x)), 104 Math::Ceil(Math::Floor(EP->position.y)), 105 Math::Ceil(Math::Floor(EP->position.z)));*/ 106 //c = ColourValue(0,0,1,0); 107 bbs->createBillboard(Vector3(EP->position.x, i, EP->position.z), c); 108 } 109 bbs->setPointRenderingEnabled(true); 110 bbs->setMaterialName("GTP/PM/EPBillboards"); 111 sm->getRootSceneNode()->createChildSceneNode("WEIGHT_DEBUG_SN")->attachObject(bbs); 112 } 81 113 } 82 114 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePMWeightComputeRenderingRun.cpp
r2410 r2420 67 67 v->setOverlaysEnabled(false); 68 68 rt->setAutoUpdated(false); 69 } 69 } 70 70 } 71 71 … … 161 161 162 162 renderFullscreenQuad(mat->getName(), rt); 163 164 //rt->writeContentsToFile("allweights.dds"); 163 165 164 166 } … … 189 191 190 192 renderFullscreenQuad(mat->getName(), rt); 193 194 //rt->writeContentsToFile("clusterweights.bmp"); 191 195 } 192 196
Note: See TracChangeset
for help on using the changeset viewer.