- Timestamp:
- 10/27/06 17:37:24 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h
r1351 r1688 45 45 float attenuation, 46 46 bool useTriangles, 47 bool blurCauCubeMap, 47 48 Pass* pass, 48 49 OgreRenderable* parentRenderable, … … 58 59 @return name of the caustic cubemap texture 59 60 */ 60 String& getCausticCubeMapName();61 const String& getCausticCubeMapName(); 61 62 float getAttenuation(){return attenuation;} 62 63 … … 77 78 float attenuation; 78 79 bool useTriangles; 80 bool blurCauCubeMap; 79 81 80 82 //inherited … … 118 120 bool useDistance; 119 121 bool useTriangles; 122 bool blurCauCubeMap; 120 123 121 124 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h
r1351 r1688 42 42 bool updateAllFace, 43 43 float attenuation, 44 bool useTriangles 44 bool useTriangles, 45 bool blurMap 45 46 ); 46 47 /** 47 48 @brief returns the name of the resulting caustic cubemap texture 48 49 */ 49 String& getCausticCubeMapTextureName(){return name;} 50 const String& getCausticCubeMapTextureName() 51 { 52 if(blurMap) 53 return bluredCausticCubemapTexture->getName(); 54 else 55 return name; 56 } 50 57 51 58 //inherited … … 79 86 Texture* causticCubemapTexture; 80 87 /** 88 @brief a pointer to the blurred cubemap texture that was created by this run 89 */ 90 Texture* bluredCausticCubemapTexture; 91 /** 81 92 @brief the name of the material that should be used when rendering the caustic cubemap 82 93 */ … … 84 95 float attenuation; 85 96 bool useTriangles; 97 bool blurMap; 86 98 87 99 //inherited -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h
r1670 r1688 42 42 @brief returns the depth shadow map texture created by this run 43 43 */ 44 StringgetDepthMapTextureName();44 const String& getDepthMapTextureName(); 45 45 46 46 /** -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp
r1351 r1688 17 17 float attenuation, 18 18 bool useTriangles, 19 bool blurCauCubeMap, 19 20 Pass* pass, 20 21 OgreRenderable* parentRenderable, … … 27 28 this->useTriangles = useTriangles; 28 29 this->photonMapMaterialName = photonMapMaterialName; 30 this->blurCauCubeMap = blurCauCubeMap; 29 31 30 32 String newMaterialName = causticMapMaterialName + parentRenderable->getName() + "_clone"; … … 109 111 updateAllFace, 110 112 attenuation, 111 useTriangles 113 useTriangles, 114 blurCauCubeMap 112 115 ); 113 116 … … 130 133 } 131 134 132 String& OgreCausticCasterRenderTechnique::getCausticCubeMapName()135 const String& OgreCausticCasterRenderTechnique::getCausticCubeMapName() 133 136 { 134 137 return ((OgreCausticCubeMapRenderingRun*) sharedRuns->getRun(ILLUMRUN_CAUSTIC_CUBEMAP)->asOgreRenderingRun())-> … … 203 206 OgreCausticCasterRenderTechniqueFactory* f = (OgreCausticCasterRenderTechniqueFactory*) factory; 204 207 f->useTriangles = StringConverter::parseBool(params); 208 } 209 210 void parseBlurCauCubeMap(String& params, RenderTechniqueFactory* factory) 211 { 212 OgreCausticCasterRenderTechniqueFactory* f = (OgreCausticCasterRenderTechniqueFactory*) factory; 213 f->blurCauCubeMap = StringConverter::parseBool(params); 205 214 } 206 215 } … … 226 235 this->attributeParsers.insert(AttribParserList::value_type("attenuation", (ILLUM_ATTRIBUTE_PARSER) parseAttenuation)); 227 236 this->attributeParsers.insert(AttribParserList::value_type("use_triangles", (ILLUM_ATTRIBUTE_PARSER) parseUseTriangles)); 237 this->attributeParsers.insert(AttribParserList::value_type("blur_caustic_cubemap", (ILLUM_ATTRIBUTE_PARSER) parseBlurCauCubeMap)); 228 238 229 239 } … … 247 257 updateAllFace = false; 248 258 useTriangles = false; 259 blurCauCubeMap = false; 249 260 250 261 parseParams(params); … … 262 273 attenuation, 263 274 useTriangles, 275 blurCauCubeMap, 264 276 pass, 265 277 parentRenderable, -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCausticCubeMapRenderingRun.cpp
r1351 r1688 14 14 bool updateAllFace, 15 15 float attenuation, 16 bool useTriangles) 16 bool useTriangles, 17 bool blurMap) 17 18 :CausticCubeMapRenderingRun(startFrame, updateInterval, resolution, updateAllFace) 18 19 , OgreRenderingRun(startFrame, updateInterval) … … 25 26 this->materialName = materialName; 26 27 this->photonMapTexId = photonMapTexId; 28 this->blurMap = blurMap; 27 29 28 30 spriteSetName = name + String("_pixelSpriteSet"); … … 34 36 { 35 37 causticCubemapTexture = createCubeRenderTexture(name, 38 Vector3(0,0,0), 39 resolution, 40 PF_FLOAT16_RGBA, 41 0); 42 43 if(blurMap) 44 bluredCausticCubemapTexture = createCubeRenderTexture(name + "_BLURED", 36 45 Vector3(0,0,0), 37 46 resolution, … … 72 81 renderFullscreenGrid(materialName, rt, tex->getWidth(), tex->getHeight()); 73 82 83 if(blurMap) 84 { 85 rt = bluredCausticCubemapTexture->getBuffer(facenum, 0).getPointer()->getRenderTarget(); 86 Material* mat = (Material*) MaterialManager::getSingleton().getByName("GameTools/BlurCubeFace").getPointer(); 87 mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureName(causticCubemapTexture->getName()); 88 mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("face", facenum); 89 renderFullscreenQuad("GameTools/BlurCubeFace", rt); 90 } 91 74 92 //rt->writeContentsToFile("caucube" + this->name + StringConverter::toString(facenum) + ".dds"); 75 93 } -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreDepthShadowMapRenderingRun.cpp
r1670 r1688 105 105 //depthMapTexture->(); 106 106 } 107 String OgreDepthShadowMapRenderingRun::getDepthMapTextureName() 107 108 const String& OgreDepthShadowMapRenderingRun::getDepthMapTextureName() 108 109 { 109 110 if(OgreIlluminationManager::getSingleton().getBlurShadowMap())
Note: See TracChangeset
for help on using the changeset viewer.