- Timestamp:
- 03/08/07 17:20:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgrePMWeightComputeRenderingRun.cpp
r2209 r2214 29 29 0, 30 30 0, 31 PF_FLOAT 16_RGBA,31 PF_FLOAT32_R, 32 32 TU_RENDERTARGET); 33 33 allWeightsTexture = texPtr.getPointer(); … … 50 50 0, 51 51 0, 52 PF_FLOAT 16_RGBA,52 PF_FLOAT32_R, 53 53 TU_RENDERTARGET); 54 54 weightTexture = texPtr.getPointer(); … … 93 93 renderFullscreenQuad(mat->getName(), rt); 94 94 95 rt->writeContentsToFile("allweights.bmp"); 95 rt->writeContentsToFile("allweights.bmp"); 96 96 // rt->writeContentsToFile("allweights.dds"); 97 98 float* allweights = new float[entryPointCnt / 4096 * 4096]; 99 PixelBox lockBox(entryPointCnt / 4096, 4096, 1, PF_FLOAT32_R, allweights); 100 allWeightsTexture->getBuffer()->blitToMemory(lockBox); 97 101 98 99 ///////////////////DEBUG 102 ///////////////////DEBUG 100 103 static BillboardSet* entryPointBBSet = 0; 101 104 if(entryPointBBSet == 0) … … 110 113 PathMapEntryPoint EP = OgreIlluminationManager::getSingleton().getPathMapEntryPoints().at(i); 111 114 Vector3 billboardPosition = EP.position; 112 float uCoord = ((float) (i % col) + 0.5f) / (float) col; 113 float vCoord = ((float)(i / col) + 0.5f) / 4096.0f; 115 116 float uCoord = allweights[i]; 117 float vCoord = 0; 118 //float uCoord = ((float) (i % col) + 0.5f) / (float) col; 119 //float vCoord = ((float)(i / col) + 0.5f) / 4096.0f; 114 120 entryPointBBSet->createBillboard(billboardPosition, ColourValue(uCoord, vCoord, 0, 0)); 115 121 } … … 119 125 sm->getRootSceneNode()->createChildSceneNode()->attachObject(entryPointBBSet); 120 126 } 127 128 delete[] allweights; 129 121 130 ///////////////// 122 131 } … … 125 134 ///not implemented 126 135 } 127 /* 136 128 137 unsigned int clustercount = OgreIlluminationManager::getSingleton().getPathMapClusterLengthsSize(); 129 138 … … 142 151 renderFullscreenQuad(mat->getName(), rt); 143 152 144 rt->writeContentsToFile("weights.bmp"); 145 rt->writeContentsToFile("weights.dds"); */ 153 //rt->writeContentsToFile("weights.bmp"); 154 //rt->writeContentsToFile("weights.dds"); 155 156 float* weights = new float[clustercount]; 157 PixelBox lockBox(clustercount, 1, 1, PF_FLOAT32_R, weights); 158 allWeightsTexture->getBuffer()->blitToMemory(lockBox); 159 160 delete[] weights; 146 161 } 147 162
Note: See TracChangeset
for help on using the changeset viewer.