Changeset 1987 for GTP/trunk/Lib/Illum
- Timestamp:
- 01/18/07 09:27:37 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreLightVolumeRenderingRun.h
r1425 r1987 91 91 */ 92 92 Texture* lightVolumeTexture; 93 Texture* lightVolumeTexture2; 94 Texture* lightVolumeTextureThis; 95 Texture* lightVolumeTextureLast; 93 96 /** 94 97 @brief a pointer to the photonmap texture that was created by this run -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.vcproj
r1722 r1987 451 451 > 452 452 <File 453 RelativePath="..\..\..\..\..\App\Demos\Illum\Ogre\Media\materials\programs\GameTools_Blur.hlsl" 454 > 455 </File> 456 <File 453 457 RelativePath="..\..\..\..\..\App\Demos\Illum\Ogre\Media\materials\programs\GameTools_Cau.hlsl" 454 458 > -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreLightVolumeRenderingRun.cpp
r1722 r1987 31 31 void OgreLightVolumeRenderingRun::createLightVolumeMap() 32 32 { 33 TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual(name ,33 TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual(name + "NoBlur", 34 34 "default", 35 35 TEX_TYPE_2D, … … 50 50 v->setBackgroundColour(ColourValue::White); 51 51 rt->setAutoUpdated(false); 52 53 54 55 56 texPtr = Ogre::TextureManager::getSingleton().createManual(name, 57 "default", 58 TEX_TYPE_2D, 59 resolution, 60 resolution, 61 0, 62 0, 63 PF_FLOAT16_RGBA, 64 TU_RENDERTARGET); 65 lightVolumeTexture2 = texPtr.getPointer(); 66 hpb = (lightVolumeTexture2->getBuffer()).getPointer(); 67 rt = hpb->getRenderTarget(); 68 v = rt->addViewport(lightVolumeCamera); 69 v->setOverlaysEnabled(false); 70 v->setBackgroundColour(ColourValue::White); 71 rt->setAutoUpdated(false); 72 v->setClearEveryFrame(true); 73 SceneManager* sm = Root::getSingleton()._getCurrentSceneManager(); 74 RenderQueue *rq = sm->getRenderQueue(); 75 sm->setFindVisibleObjects(false); 76 rq->clear(); 77 v->update(); 78 sm->setFindVisibleObjects(true); 79 v->setClearEveryFrame(false); 52 80 53 81 if(textureDepth > 1) … … 107 135 RenderTarget* rt = lightVolumeTexture->getBuffer().getPointer()->getRenderTarget(); 108 136 rt->update(); 137 restoreMaterials(); 138 139 //do blending 140 rt = lightVolumeTexture2->getBuffer().getPointer()->getRenderTarget(); 141 Material* mat = (Material*) MaterialManager::getSingleton().getByName("GameTools/BlurLightVolume").getPointer(); 142 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(lightVolumeTexture->getName()); 143 renderFullscreenQuad("GameTools/BlurLightVolume", rt); 144 145 146 /* 147 static int framecount = 0; 148 String filename = "lightvolume"; 149 filename.append(this->name); 150 //filename.append(StringConverter::toString(framecount)); 151 filename.append(".bmp"); 152 if(framecount % 5 == 0) 153 rt->writeContentsToFile(filename); 154 framecount++;*/ 155 109 156 } 110 157 else … … 130 177 lightVolumeTexture3D->getBuffer()->blitFromMemory(volumePB); 131 178 } 132 133 } 134 135 restoreMaterials(); 179 restoreMaterials(); 180 } 181 182 183 184 136 185 137 186 /* … … 141 190 lightVolumeTexture3D->getBuffer()->blitFromMemory(volumePB); 142 191 */ 143 /* 144 static int framecount = 0; 145 String filename = "lightvolume"; 146 filename.append(this->name); 147 //filename.append(StringConverter::toString(framecount)); 148 filename.append(".bmp"); 149 if(framecount % 5 == 0) 150 rt->writeContentsToFile(filename); 151 framecount++;*/ 192 152 193 153 194
Note: See TracChangeset
for help on using the changeset viewer.