Changeset 2240 for GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include
- Timestamp:
- 03/13/07 09:27:17 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h
r2200 r2240 22 22 using namespace Ogre; 23 23 24 /** 25 @brief Structure to store path map cluster information for a subentity. 26 */ 24 27 struct PathMapClusters 25 28 { 29 /** 30 @brief the number of clusters this subentity belongs to 31 */ 26 32 unsigned int count; 33 /** 34 @brief the indices of the cluster this subentity belongs to. 35 */ 27 36 unsigned int* clusters; 37 /** 38 @brief the name of the path map file this subentity uses 39 */ 28 40 String pathMapTextureFilename; 41 /** 42 @brief the resolution of the path map file. 43 */ 29 44 unsigned int pathMapResolution; 30 45 }; 31 46 47 /** 48 @brief Structure of a path map entry point. 49 */ 32 50 struct PathMapEntryPoint 33 51 { 52 /** 53 @brief the position of the entry point. 54 */ 34 55 Vector3 position; 56 /** 57 @brief the normal of the entry point. 58 */ 35 59 Vector3 normal; 60 /** 61 @brief the probability of the entry point. 62 */ 36 63 float prob; 37 64 }; 65 38 66 /** 39 67 @brief Implementation of IlluminationManager in an OGRE environment. … … 70 98 */ 71 99 BillboardSet* findRenderableInParticleSystem(ParticleSystem* system); 100 /** 101 @brief Fires preAllUpdates for registered UpdateListeners. 102 103 This is called in each frame before updating the RenderTechniques. 104 */ 72 105 void preAllUpdates(); 106 /** 107 @brief Fires postAllUpdates for registered UpdateListeners. 108 109 This is called in each frame after updating the RenderTechniques. 110 */ 73 111 void postAllUpdates(); 74 112 … … 83 121 */ 84 122 float maxRad; 123 /** 124 @brief Size of the focusing map. 125 126 This map is used if the shadow maps should be focused. 127 */ 85 128 unsigned int focusingMapSize; 129 /** 130 @brief Size of the shadow maps. 131 */ 86 132 unsigned int shadowMapSize; 133 /** 134 @brief Size of area lights for soft shadows. 135 */ 87 136 float areaLightRadius; 137 /** 138 @brief Sets if light space perspective shadow mapping should be used. 139 */ 88 140 bool useLISPSM; 89 bool useVSM; 141 /** 142 @brief Sets if the shadow maps should be blurred. 143 144 Used in variance shadow mapping. 145 */ 90 146 bool blurSM; 147 /** 148 @brief Sets if shadow maps should be focused. 149 */ 91 150 bool focusingSM; 151 /** 152 @brief The material name that should be used during rendering the shadow maps. 153 154 There are several predefined materials that can be used to render shadow maps: 155 - GTP/Basic/Depth : writes projected depth values of front facing polygons 156 - GTP/Basic/DepthCCW : writes projected depth values of back facing polygons 157 - GTP/Basic/Distance : writes distance values (from eyepoint) of front facing polygons 158 - GTP/Basic/DistanceCCW : writes distance values (from eyepoint) of back facing polygons 159 - GTP/Basic/Distance_Normalized : writes normalized distance values 160 (distance values devided by projection farplane - which is set to the attenuation range in case of shadow maps) of front facing polygons 161 - GTP/Basic/Distance_NormalizedCCW : writes normalized distance values of back facing polygons 162 163 The default material is GTP/Basic/Distance_NormalizedCCW. 164 Recommended materials for different light types: 165 - spot and point lights : GTP/Basic/Distance_NormalizedCCW or GTP/Basic/Distance_Normalized 166 - directional lights : GTP/Basic/Depth or GTP/Basic/DepthCCW 167 */ 92 168 String shadowMapMaterialName; 169 /** 170 @brief Size of the phase texture. 171 */ 93 172 unsigned int phaseTextureSize; 173 /** 174 @brief Stores maximum bounding radius values for each rendering run type. 175 */ 94 176 std::map<RenderingRunType,float> maxRads; 177 /** 178 @brief Stores PathMapClusters structures for each subentity. 179 180 The String key is the name of the subentity. 181 */ 95 182 std::map<String, PathMapClusters> pathMapClusters; 183 /** 184 @brief PathMapEntryPoint list. 185 */ 96 186 std::vector<PathMapEntryPoint> pathMapEntryPoints; 187 /** 188 @brief Stores cluster size for each path map cluster. 189 */ 97 190 std::vector<unsigned int> pathMapClusterLengths; 98 191 /** … … 139 232 */ 140 233 std::map<String, OgreSharedRuns*> perLightRuns; 141 234 /** 235 @brief 236 */ 142 237 std::map<GlobalTargetType, GlobalUseRenderTarget*> globalTargets; 143 238 /** 239 @brief Stores registered UpdateListeners. 240 */ 144 241 std::vector<UpdateListener*> updateListeners; 145 242 146 243 public: 147 244 /** 245 @brief Registers an UpdateListener instance. @see UpdateListener 246 */ 148 247 void addUpdateListener(UpdateListener* l){updateListeners.push_back(l);} 149 248 /** … … 156 255 /** 157 256 @brief retirieves the maximum bounding sphere radius with two SharedRuns can be joined. 257 258 Only valid fi all run types use the same radius. This can be set with calling setMaxJoinRadius(). 259 @see setMaxJoinRadius 158 260 */ 159 261 float getMaxJoinRadius(){return maxRad;} 262 /** 263 @brief Retirieves the maximum shared bounding sphere radius for a given run type. 264 */ 160 265 float getMaxJoinRadius(RenderingRunType type){return maxRads[type];} 161 266 /** 162 @brief sets the maximum bounding sphere radius with two SharedRuns can be joined .267 @brief sets the maximum bounding sphere radius with two SharedRuns can be joined for all run type. 163 268 */ 164 269 void setMaxJoinRadius(float rad) … … 176 281 177 282 } 283 /** 284 @brief Sets the maximum shared bounding sphere radius for a given run type. 285 */ 178 286 void setMaxJoinRadius(RenderingRunType type, float rad){maxRads[type] = rad;} 287 /** 288 @see focusingMapSize 289 */ 179 290 void setFocusingMapSize(unsigned int size){focusingMapSize = size;} 291 /** 292 @see phaseTextureSize 293 */ 180 294 void setPhaseTextureSize(unsigned int size){phaseTextureSize = size;} 295 /** 296 @see shadowMapSize 297 */ 181 298 void setShadowMapSize(unsigned int size){shadowMapSize = size;} 182 299 /** … … 285 402 RenderingRun* getGlobalRun(RenderingRunType runType); 286 403 404 // These GlobalUseRenderTargets are only used in fire render technique. Maybe it could be solved with global rendering runs too. 287 405 GlobalUseRenderTarget* getGlobalTarget(GlobalTargetType type); 288 406 void addGlobalTarget(GlobalTargetType type, GlobalUseRenderTarget* target); 407 289 408 /** 290 409 @brief Updates a global RenderingRun with the given type. … … 318 437 */ 319 438 void updatePerLightRun(String lightName, RenderingRunType runType, unsigned long frameNum); 320 439 /** 440 @brief Saves the phase texture to the given file. 441 */ 321 442 void savePhaseTextureToFile(String filename); 322 443 /** 444 @brief Frame listener event handler function. 445 446 Inherited from FrameListener. Called at the beginning of each frame. 447 */ 323 448 bool frameStarted(const FrameEvent& evt) 324 449 { 325 450 update(Root::getSingleton().getCurrentFrameNumber(), mainViewport->getTarget()); 326 451 return FrameListener::frameStarted(evt); 327 } 328 452 } 453 /** 454 @see useLISPSM 455 */ 329 456 bool getUseLISPSM(){return useLISPSM;} 330 bool getUseVSM(){return useVSM;} 457 /** 458 @see focusingSM 459 */ 331 460 bool getFocusingShadowMap(){return focusingSM;} 461 /** 462 @see blurSM 463 */ 332 464 bool getBlurShadowMap(){return blurSM;} 465 /** 466 @see useLISPSM 467 */ 333 468 void setUseLISPSM(bool use){useLISPSM = use;} 334 void setUseVSM(bool use){useVSM = use;} 469 /** 470 @see focusingSM 471 */ 335 472 void setFocusingSM(bool use){focusingSM = use;} 473 /** 474 @see blurSM 475 */ 336 476 void setBlurShadowMap(bool use){blurSM = use;} 477 /** 478 @see shadowMapMaterialName 479 */ 337 480 void setShadowMapMaterialName(String name){shadowMapMaterialName = name;} 338 481 /** 482 @brief Registers a PathMapClusters structure for a given subentity. 483 484 @param subEntityName name of te subentity 485 @param clusters the PathMapClusters that belongs to the given subentity 486 */ 339 487 void addPathMapClusters(String subEntityName, PathMapClusters clusters) 340 488 { 341 489 this->pathMapClusters[subEntityName] = clusters; 342 490 } 491 /** 492 @brief Returns the PathMapClusters structure registered for a given subentity. 493 494 @param subEntityName name of te subentity 495 @return pointer to the PathMapClusters structure that belongs to the given subentity 496 */ 343 497 PathMapClusters* getPathMapClusters(String subEntityName) 344 498 { 345 499 return &pathMapClusters[subEntityName]; 346 500 } 501 /** 502 @brief Adds a new PathMapEntryPoint cluster to the entrypoint list. 503 */ 347 504 void addPathMapEntryPoint(PathMapEntryPoint p) 348 505 { 349 506 this->pathMapEntryPoints.push_back(p); 350 507 } 508 /** 509 @brief Returns the list of entrypoints. 510 */ 351 511 std::vector<PathMapEntryPoint>& getPathMapEntryPoints() 352 512 { 353 513 return pathMapEntryPoints; 354 514 } 515 /** 516 @brief Adds a new cluster size. 517 */ 355 518 void addPathMapClusterLength(unsigned int l) 356 519 { 357 520 this->pathMapClusterLengths.push_back(l); 358 521 } 522 /** 523 @brief Gets the number of clusters. 524 */ 359 525 unsigned int getPathMapClusterLengthsSize() 360 526 { 361 527 return this->pathMapClusterLengths.size(); 362 528 } 529 /** 530 @brief Gets the size of the given cluster. 531 532 @param index of the cluster 533 @return the size of the cluster 534 */ 363 535 unsigned int getPathMapClusterLength(unsigned int index) 364 536 { 365 537 return pathMapClusterLengths.at(index); 366 538 } 539 /** 540 @see areaLightRadius 541 */ 367 542 float getAreaLightRadius(){return areaLightRadius;} 543 /** 544 @see areaLightRadius 545 */ 368 546 void setAreaLigtRadius(float radius){areaLightRadius = radius;} 369 547 }; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderTechnique.h
r1055 r2240 6 6 class OgreTechniqueGroup; 7 7 8 /** 9 @brief Event handler class. 10 11 The derived calsses of this class can register task that should be done before and/or after updating all RenderTechniques. 12 UpdateListeners can be registered to the OgreIlluminationMager. @see addUpdateListener 13 */ 8 14 class UpdateListener 9 15 { 10 16 public: 17 /** 18 @brief Called before RenderTechnique updates 19 */ 11 20 virtual void preAllUpdates(){} 21 /** 22 @brief Called after RenderTechnique updates 23 */ 12 24 virtual void postAllUpdates(){} 13 25 }; … … 100 112 OgreRenderable* parentRenderable, 101 113 OgreTechniqueGroup* parentTechniqueGroup) = 0; 114 /** 115 @brief parses parameters from the material file. 102 116 117 The parsed parameters will be passed to the new RenderTechnique's constructor. 118 119 @param params pointer to the IllumTechniqueParams structure that was read from the material script and containes the parameters to be parsed. 120 121 */ 103 122 virtual void parseParams(IllumTechniqueParams* params); 104 123 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderable.h
r1425 r2240 50 50 */ 51 51 ~OgreRenderable(void); 52 53 52 /** 54 53 @brief Sets the visibility of the wrapped renderable. … … 135 134 */ 136 135 Renderable* getRenderable(); 137 138 136 139 137 protected: 140 141 138 /** 142 139 @brief unique name assigned to the renderable … … 155 152 */ 156 153 BillboardSet* billboardSetRenderable; 154 /** 155 @brief pointer to the parent Particle System of the wrapped BillboardSet (if the renderable is a BillboardSet) 156 */ 157 157 ParticleSystem* parentParticleSystem; 158 159 158 /** 160 159 @brief axis-aligned bounding box of the wrapped renderable in world space -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h
r1722 r2240 45 45 */ 46 46 std::map<Renderable*, String> visibleObjects; 47 String terrainMaterial;48 47 /** 49 48 @brief fulls screen quad plane used in full screen quad rendering … … 82 81 */ 83 82 String spriteSetName; 84 85 83 /** 86 84 @brief Returns a direction for a cubemap face id. … … 163 161 */ 164 162 void renderPixelSprites(String& materialName, RenderTarget* rt, int width, int height); 165 void renderFullscreenGrid(String& materialName, RenderTarget* rt, int width, int height); 166 163 /** 164 @brief Renders a grid onto the screen. 165 166 @param rt the RenderTarget the grid should be rendered on 167 @param width the desired horizontal resolution of the grid 168 @param height the desired vertical resolution of the grid 169 */ 170 void renderFullscreenGrid(String& materialName, RenderTarget* rt, int width, int height); 167 171 }; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreSharedRuns.h
r1722 r2240 19 19 RenderTarget* renderTarget; 20 20 }; 21 21 22 /** 22 23 @brief Class of SharedRuns used in an OGRE environment. … … 183 184 //inherited 184 185 void destroy(); 186 //inherited 185 187 void runUpdated(RenderingRunType runType, RenderingRun* run); 188 //inherited 186 189 void runChanged(RenderingRunType runType, RenderingRun* run); 190 //inherited 187 191 virtual void addTechniqueGroup(TechniqueGroup* group){childTechniqueGroups.push_back(group);} 192 /** 193 @brief Sets the given material for all connected renderables. 194 195 The previous materials will be stored so later can be restored. @see restoreMaterial 196 197 @param name of the material to be set. 198 */ 188 199 void setMaterial(String materialName); 200 /** 201 @brief Restores the prevoius materials for the connected renderables. @see setMaterial 202 */ 189 203 void restoreMaterial(); 190 204 … … 203 217 std::map<RenderingRunType, RenderingRun*> sharedRuns; 204 218 /** 205 @brief map of connected renderabl is with visibility information219 @brief map of connected renderables with visibility information 206 220 207 221 Used to show or hide the renderables connected to a leaf OgreSharedRuns node. 208 222 */ 209 std::map<OgreRenderable*, bool> renderables; 223 std::map<OgreRenderable*, bool> renderables; 224 /** 225 @brief map of connected renderables with material name information 226 227 Used to resture the original materials of the renderables connected to a leaf OgreSharedRuns node. 228 */ 210 229 std::map<OgreRenderable*, String> renderableMaterials; 211 230 /** -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h
r1688 r2240 30 30 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 31 31 @param useDistance tells if a distance cubemap impostor should be used in photon hit calculation (recommended) 32 @param attenuation attenuation distance of the caustic 33 @param useTriangles sets if triangles should be rendered into the caustic cubemap instead of sprites 34 @param blurCauCubeMap sets if the caustic cubemap should be blurred (recommended if rendering caustic triangles) 32 35 @param pass the pass to operate on 33 36 @param parentRenderable the object to operate on … … 37 40 unsigned long photonMapUpdateInterval, 38 41 unsigned int photonMapResolution, 39 unsigned int c usticCubeMapResolution,42 unsigned int causticCubeMapResolution, 40 43 String photonMapMaterialName, 41 44 String causticMapMaterialName, … … 60 63 */ 61 64 const String& getCausticCubeMapName(); 65 /** 66 @see attenuation 67 */ 62 68 float getAttenuation(){return attenuation;} 63 69 … … 76 82 */ 77 83 unsigned char photonMapTexID; 84 /** 85 @brief attenuation distance of the caustic 86 */ 78 87 float attenuation; 88 /** 89 @brief sets if triangles should be rendered into the caustic cubemap instead of sprites 90 */ 79 91 bool useTriangles; 92 /** 93 @brief sets if the caustic cubemap should be blurred (recommended if rendering caustic triangles) 94 */ 80 95 bool blurCauCubeMap; 81 96 … … 96 111 }; 97 112 98 113 /** 114 @brief RenderTechniqueFactory to create OgreCausticCasterRenderTechnique instances. 115 */ 99 116 class OgreCausticCasterRenderTechniqueFactory : public RenderTechniqueFactory 100 117 { … … 121 138 bool useTriangles; 122 139 bool blurCauCubeMap; 123 124 125 140 }; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticRecieverRenderTechnique.h
r836 r2240 84 84 }; 85 85 86 /** 87 @brief RenderTechniqueFactory to create OgreCausticRecieverRenderTechnique instances. 88 */ 86 89 class OgreCausticRecieverRenderTechniqueFactory : public RenderTechniqueFactory 87 90 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreColorCubeMapRenderTechnique.h
r1930 r2240 15 15 16 16 /** 17 @brief C ubeMapRenderTechnique used in an Ogre environment.17 @brief ColorCubeMapRenderTechnique used in an Ogre environment. 18 18 */ 19 19 class OgreColorCubeMapRenderTechnique : public ColorCubeMapRenderTechnique, … … 34 34 @param angleTolerance angle tolerance used in face skip 35 35 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 36 @param renderSelf sets if the object should be rendered to the cube map 37 @param renderEnvironment sets if the environment should be rendered to the cube map 38 @param selfMaterial the material that should be set for the object while rendering the cubemap 39 @param environmentMaterial the material that should be set for the environment while rendering the cubemap 40 @param layer the layer of this cubemap 41 @param getMinMax sets if the minimum and maximum values of the cubemap should be computed 42 @param attachToTexUnit sets if this cubemap should be attach to a texture unit of the pass 43 @param minVariableName sets the name of the gpu shader program parameter to which the minimum value should be bound to 44 @param maxVariableName sets the name of the gpu shader program parameter to which the maximum value should be bound to 36 45 @param pass the pass to operate on 37 46 @param parentRenderable the object to operate on … … 70 79 protected: 71 80 //inherited 72 void colorCubeMapRunChanged(RenderingRun* run); 81 void colorCubeMapRunChanged(RenderingRun* run); 82 //inherited 73 83 void colorCubeMapRunUpdated(RenderingRun* run); 74 84 }; 75 85 86 /** 87 @brief RenderTechniqueFactory to create OgreColorCubeMapRenderTechnique instances. 88 */ 76 89 class OgreColorCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory 77 90 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.h
r1886 r2240 35 35 @param angleTolerance angle tolerance used in face skip 36 36 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 37 @param renderSelf sets if the object should be rendered to the cube map 38 @param renderEnvironment sets if the environment should be rendered to the cube map 39 @param selfMaterial the material that should be set for the object while rendering the cubemap 40 @param environmentMaterial the material that should be set for the environment while rendering the cubemap 41 @param getMinMax sets if the minimum and maximum values of the cubemap should be computed 42 @param attachToTexUnit sets if this cubemap should be attach to a texture unit of the pass 43 @param minVariableName sets the name of the gpu shader program parameter to which the minimum value should be bound to 44 @param maxVariableName sets the name of the gpu shader program parameter to which the maximum value should be bound to 37 45 @param pass the pass to operate on 38 46 @param parentRenderable the object to operate on … … 80 88 }; 81 89 82 83 90 /** 91 @brief RenderTechniqueFactory to create OgreConvoledCubeMapRenderTechnique instances. 92 */ 84 93 class OgreConvoledCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory 85 94 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCubeMapRenderTechnique.h
r1930 r2240 34 34 @param angleTolerance angle tolerance used in face skip 35 35 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 36 @param renderSelf sets if the object should be rendered to the cube map 37 @param renderEnvironment sets if the environment should be rendered to the cube map 38 @param selfMaterial the material that should be set for the object while rendering the cubemap 39 @param environmentMaterial the material that should be set for the environment while rendering the cubemap 40 @param layer the layer of this cubemap 41 @param getMinMax sets if the minimum and maximum values of the cubemap should be computed 42 @param attachToTexUnit sets if this cubemap should be attach to a texture unit of the pass 43 @param minVariableName sets the name of the gpu shader program parameter to which the minimum value should be bound to 44 @param maxVariableName sets the name of the gpu shader program parameter to which the maximum value should be bound to 36 45 @param pass the pass to operate on 37 46 @param parentRenderable the object to operate on … … 73 82 */ 74 83 unsigned char texID; 84 /** 85 @brief the material that should be set for the object while rendering the cubemap 86 */ 75 87 String selfMaterial; 88 /** 89 @brief the material that should be set for the environment while rendering the cubemap 90 */ 76 91 String environmentMaterial; 92 //helper string to name the created cubemaps 77 93 String texturePostFix; 78 94 /** 95 @brief sets if the minimum and maximum values of the cubemap should be computed 96 */ 79 97 bool getMinMax; 98 /** 99 @brief sets if this cubemap should be attach to a texture unit of the pass 100 */ 80 101 bool attachToTexUnit; 102 /** 103 @brief sets the name of the gpu shader program parameter to which the minimum value should be bound to 104 */ 81 105 String minVariableName; 106 /** 107 @brief sets the name of the gpu shader program parameter to which the maximum value should be bound to 108 */ 82 109 String maxVariableName; 83 110 111 //inherited 84 112 RenderingRun* createCubeMapRun(); 85 void cubeMapRunChanged(RenderingRun* run); 113 //inherited 114 void cubeMapRunChanged(RenderingRun* run); 115 //inherited 86 116 void cubeMapRunUpdated(RenderingRun* run); 87 117 }; 88 118 119 /** 120 @brief RenderTechniqueFactory to create OgreCubeMapRenderTechnique instances. 121 */ 89 122 class OgreCubeMapRenderTechniqueFactory : public RenderTechniqueFactory 90 123 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreDepthShadowRecieverRenderTechnique.h
r2180 r2240 39 39 @param shadowFragmentProgram the fragment program to be used in the shadowing passes 40 40 It should have one pass and the depth map of a light will be bound to the first sampler unit. 41 @param WorldViewProjParamName the name of the gpu program parameter the world-view-projection matrix should be bound to 42 @param WorldParamName the name of the gpu program parameter the world matrix should be bound to 43 @param setLightViewMatrix bound light space view matrix to a gpu program parameter 44 @param setLightViewProjMatrix bound light space view-projection matrix to a gpu program parameter 45 @param setLightProjFarPlane bound light space projection far plane to a gpu program parameter 46 @param lightViewProjParamName the name of the gpu program parameter the light space view-projection matrix should be bound to 47 @param lightViewParamName the name of the gpu program parameter the light space view matrix should be bound to 48 @param lightFarPlaneParamName the name of the gpu program parameter the light space projection far plane should be bound to 41 49 @param pass the pass after which shadowing passes should be added 42 50 @param parentRenderable the object to operate on … … 88 96 */ 89 97 std::vector<Pass*> passes; 98 /** 99 @brief bound light space view matrix to a gpu program parameter 100 */ 90 101 bool setLightViewMatrix; 102 /** 103 @brief bound light space view-projection matrix to a gpu program parameter 104 */ 91 105 bool setLightViewProjMatrix; 106 /** 107 @brief bound light space projection far plane to a gpu program parameter 108 */ 92 109 bool setLightProjFarPlane; 110 /** 111 @brief the name of the gpu program parameter the light space view-projection matrix should be bound to 112 */ 93 113 String lightViewProjParamName; 114 /** 115 @brief the name of the gpu program parameter the light space view matrix should be bound to 116 */ 94 117 String lightViewParamName; 118 /** 119 @brief the name of the gpu program parameter the light space projection far plane should be bound to 120 */ 95 121 String lightFarPlaneParamName; 122 /** 123 @brief the name of the gpu program parameter the world-view-projection matrix should be bound to 124 */ 96 125 String WorldViewProjParamName; 126 /** 127 @brief the name of the gpu program parameter the world matrix should be bound to 128 */ 97 129 String WorldParamName; 98 130 99 131 }; 100 132 101 133 /** 134 @brief RenderTechniqueFactory to create OgreDepthShadowRecieverRenderTechnique instances. 135 */ 102 136 class OgreDepthShadowRecieverRenderTechniqueFactory : public RenderTechniqueFactory 103 137 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreDistanceCubeMapRenderTechnique.h
r1886 r2240 34 34 @param angleTolerance angle tolerance used in face skip 35 35 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 36 @param renderSelf sets if the object should be rendered to the cube map 37 @param renderEnvironment sets if the environment should be rendered to the cube map 38 @param selfMaterial the material that should be set for the object while rendering the cubemap 39 @param environmentMaterial the material that should be set for the environment while rendering the cubemap 40 @param layer the layer of this cubemap 41 @param getMinMax sets if the minimum and maximum values of the cubemap should be computed 42 @param attachToTexUnit sets if this cubemap should be attach to a texture unit of the pass 43 @param minVariableName sets the name of the gpu shader program parameter to which the minimum value should be bound to 44 @param maxVariableName sets the name of the gpu shader program parameter to which the maximum value should be bound to 36 45 @param pass the pass to operate on 37 46 @param parentRenderable the object to operate on … … 78 87 }; 79 88 80 89 /** 90 @brief RenderTechniqueFactory to create OgreDistanceCubeMapRenderTechnique instances. 91 */ 81 92 class OgreDistanceCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory 82 93 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreFireRenderTechnique.h
r1055 r2240 26 26 27 27 /** 28 @brief SBBRenderTechnique used in an OGRE environment. 28 @brief A special SBBRenderTechnique used in an OGRE environment. 29 30 Instead of rendering to the frame buffer this Technique renders into two render targets at the same time. 31 The firs render target will be used as it were an ordinary backbuffer. 32 The second rendertarget will be used to simulate heat shimmering (offset values will be written to it). 33 The shimmering effect will be achieved with post processing: combining the backbuffer with the first render target using the second render target as uv offset. 34 Just like the spherical billboard techniqeue, this thechnique requires a depth image taken from main camera's viewpoint. 29 35 */ 30 36 class OgreFireRenderTechnique : public OgreRenderTechnique, … … 52 58 //inherited 53 59 virtual void update(unsigned long frameNum); 54 60 //inherited 55 61 void preRenderTargetUpdate (const RenderTargetEvent &evt); 62 //inherited 56 63 void postRenderTargetUpdate (const RenderTargetEvent &evt); 64 //inherited 57 65 bool frameEnded (const FrameEvent &evt); 66 //inherited 58 67 void preAllUpdates(); 59 68 … … 67 76 }; 68 77 69 78 /** 79 @brief RenderTechniqueFactory to create OgreFireRenderTechnique instances. 80 */ 70 81 class OgreFireRenderTechniqueFactory : public RenderTechniqueFactory 71 82 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreHierarchicalParticleSystemTechnique.h
r1425 r2240 12 12 13 13 /** 14 @brief CausticCasterRenderTechnique used in an OGRE environment.14 @brief HierarchicalParticleSystemTechnique used in an OGRE environment. 15 15 */ 16 16 class OgreHierarchicalParticleSystemTechnique : public OgreRenderTechnique, … … 18 18 { 19 19 public: 20 /** 21 @brief Constructor. 20 22 23 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 24 @param impostorUpdateInterval update frequency of the impostor texture (image of the smaller system) 25 @param impostorResolution resolution of the impostor texture 26 @param impostorTexID the id of the texture unit state the impostor image should be bound to 27 @param useDistCalc flag to skip impostor update if object is far away (//not used) 28 @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal 29 @param childPSysScriptName name of the small particle system script 30 @param useOwnMaterial use the material for the smaller system that was defined in the particle script 31 @param impostorMaterialName use this specific material for the small particle system 32 @param useVParam bound particle radius to a gpu vertex program parameter 33 @param VParamRadius name of the gpu vertex program parameter the particle radius should be bound to 34 @param useFParam bound particle radius to a gpu fragment program parameter 35 @param FParamRadius name of the gpu fragment program parameter the particle radius should be bound to 36 @param pass the pass to operate on 37 @param parentRenderable the object to operate on 38 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 39 */ 21 40 OgreHierarchicalParticleSystemTechnique(unsigned long startFrame, 22 41 unsigned long impostorUpdateInterval, … … 43 62 44 63 protected: 45 64 /** 65 @brief use this specific material for the small particle system 66 */ 46 67 String impostorMaterialName; 68 /** 69 @brief name of the small particle system script 70 */ 47 71 String childPSysScriptName; 72 /** 73 @brief name of the created child particle system 74 */ 48 75 String childPSysName; 76 /** 77 @brief the id of the texture unit state the impostor image should be bound to 78 */ 49 79 unsigned char impostorTexID; 80 /** 81 @brief use the material for the smaller system that was defined in the particle script 82 */ 50 83 bool useOwnMaterial; 84 /** 85 @brief name of the gpu vertex program parameter the particle radius should be bound to 86 */ 51 87 String VParamRadius; 88 /** 89 @brief name of the gpu fragment program parameter the particle radius should be bound to 90 */ 52 91 String FParamRadius; 92 /** 93 @brief bound particle radius to a gpu vertex program parameter 94 */ 53 95 bool useVParam; 96 /** 97 @brief bound particle radius to a gpu fragment program parameter 98 */ 54 99 bool useFParam; 55 100 56 101 //inherited 57 102 RenderingRun* createChildPSysRenderingRun(); 103 //inherited 58 104 RenderingRun* createLightVolumeRenderingRun(); 105 //inherited 59 106 virtual void impostorChanged(RenderingRun* run); 107 //inherited 60 108 virtual void impostorUpdated(RenderingRun* run); 61 109 }; 62 110 111 /** 112 @brief RenderTechniqueFactory to create OgreHierarchicalParticleSystemTechnique instances. 113 */ 63 114 class OgreHierarchicalParticleSystemTechniqueFactory : public RenderTechniqueFactory 64 115 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreIllumVolumeRenderTechnique.h
r1425 r2240 12 12 13 13 /** 14 @brief CausticCasterRenderTechnique used in an OGRE environment.14 @brief IllumVolumeRenderTechnique used in an OGRE environment. 15 15 */ 16 16 class OgreIllumVolumeRenderTechnique : public OgreRenderTechnique, … … 18 18 { 19 19 public: 20 /** 21 @brief Constructor. 20 22 23 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 24 @param illumVolumeUpdateInterval the update frequency of the light volume 25 @param illumTextureResolution the resolution of the light volume texture 26 @param textureDepth the number of layers to use (should be set to 1) 27 @param illumTexID the id of the texture unit state the resulting illumevolume should be bound to 28 @param useDistCalc flag to skip updates if the shaded particle system is far away (not used) 29 @param materialName the name of the material that is used while rendering the light volume 30 @param lightMatrixGPUParamName the name of the gpu program parameter where the light matrix should be bound to 31 @param useHierarchicalImpostor set this flag to true if the particle system is a hierarchical particle system 32 @param impostorTexID the id of the texture unit state where the impostor image of the smaller system should be bound to 33 @param pass the pass to operate on 34 @param parentRenderable the object to operate on 35 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 36 */ 21 37 OgreIllumVolumeRenderTechnique(unsigned long startFrame, 22 38 unsigned long illumVolumeUpdateInterval, … … 39 55 40 56 protected: 41 57 /** 58 @brief the name of the material that is used while rendering the light volume 59 */ 42 60 String materialName; 61 /** 62 @brief the id of the texture unit state the resulting illumevolume should be bound to 63 */ 43 64 unsigned char illumTexID; 65 /** 66 @brief the name of the gpu program parameter where the light matrix should be bound to 67 */ 44 68 String lightMatrixGPUParamName; 69 /** 70 @brief the id of the texture unit state where the impostor image of the smaller system should be bound to 71 */ 45 72 unsigned char impostorTexID; 46 73 47 74 //inherited 48 75 RenderingRun* createLightVolumeRenderingRun(); 76 //inherited 49 77 void lightVolumeChanged(RenderingRun* run); 78 //inherited 50 79 void lightVolumeUpdated(RenderingRun* run); 80 //inherited 51 81 void hierarchicalImpostorUpdated(RenderingRun* run); 52 82 }; 53 83 84 /** 85 @brief RenderTechniqueFactory to create OgreIllumVolumeRenderTechnique instances. 86 */ 54 87 class OgreIllumVolumeRenderTechniqueFactory : public RenderTechniqueFactory 55 88 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgrePathMapRenderTechnique.h
r2200 r2240 15 15 struct PathMapClusters; 16 16 /** 17 @brief DepthShadowRecieverRenderTechnique used in an OGRE environment.17 @brief A technique that defines that the rendering of the object will use the path map technique. 18 18 19 This technique defines that the object will recieve shadows with the help of depth shadow maps. 20 Each lightsource can have a depth map assigned to it. These are going to be refreshed only 21 if shadow recievers are visible. It is the shadow reciever technique's resposibility 22 to refresh them. 23 24 The shadows from each light are calculated in separate passes. Each pass will 25 modulate the shaded image, so thes should be the last passes (but before caustic passes). 26 The given Pass* parameter n the constructor defines the pass after which new 27 shadow recieving passes will be added by the technique. 28 19 This rendering technique can add indirect lighting to the scene. 29 20 */ 30 21 class OgrePathMapRenderTechnique : public OgreRenderTechnique … … 34 25 @brief Constructor. 35 26 36 @param maxlights the maximum number of light sources to recieve shadow from37 @param shadowVertexProgram the vertex program to be used in the shadowing passes38 @param shadowFragmentProgram the fragment program to be used in the shadowing passes39 It should have one pass and the depth map of a light will be bound to the first sampler unit.40 27 @param pass the pass after which shadowing passes should be added 41 28 @param parentRenderable the object to operate on … … 54 41 virtual void update(unsigned long frameNum); 55 42 56 protected: 43 protected: 44 /** 45 @brief the new pass created by this technique 46 */ 57 47 Pass* pathMapPass; 58 PathMapClusters* clusters; 48 /** 49 @brief the PathMapClusters structure that belongs to the subentity renderable 50 */ 51 PathMapClusters* clusters; 52 /** 53 @brief the weight index lookup map created by this technique 54 */ 59 55 Texture* weightIndexTexture; 60 56 /** 57 @brief create a weight index lookup map 58 */ 61 59 void createWeightIndexTexture(); 62 60 }; 63 61 64 62 /** 63 @brief RenderTechniqueFactory to create OgrePathMapRenderTechnique instances. 64 */ 65 65 class OgrePathMapRenderTechniqueFactory : public RenderTechniqueFactory 66 66 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h
r1055 r2240 42 42 //inherited 43 43 virtual void update(unsigned long frameNum); 44 44 //inherited 45 45 void preRenderTargetUpdate (const RenderTargetEvent &evt); 46 //inherited 46 47 void postRenderTargetUpdate (const RenderTargetEvent &evt); 48 //inherited 47 49 bool frameEnded (const FrameEvent &evt); 50 //inherited 48 51 void preAllUpdates(); 52 //inherited 49 53 void postAllUpdates(); 50 54 … … 59 63 }; 60 64 61 65 /** 66 @brief RenderTechniqueFactory to create OgreSBBRenderTechnique instances. 67 */ 62 68 class OgreSBBRenderTechniqueFactory : public RenderTechniqueFactory 63 69 { -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h
r2142 r2240 14 14 15 15 /** 16 @brief C olorCubeMapRenderingRun used in an OGRE environment.16 @brief CausticCubeMapRenderingRun used in an OGRE environment. 17 17 */ 18 18 class OgreCausticCubeMapRenderingRun : public OgreRenderingRun, … … 32 32 @param photonMapTexId the texture unit state id of the caustic map generation material where the photonhit map should be bound to 33 33 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 34 @param attenuation attenuation distance of the caustic 35 @param useTriangles sets if triangles should be rendered into the caustic cubemap instead of sprites 36 @param blurMap sets if the caustic cubemap should be blurred (recommended if rendering caustic triangles) 34 37 */ 35 38 OgreCausticCubeMapRenderingRun(OgreSharedRuns* sharedRuns, … … 58 61 //inherited 59 62 void photonMapChanged(RenderingRun* run); 63 /** 64 @see attenuation 65 */ 60 66 float getAttenuation(){return attenuation;} 61 67 //inherited 62 68 bool canJoin(RenderingRun* run) 63 69 { … … 67 73 return false; 68 74 } 69 75 /** 76 @see blurMap 77 */ 70 78 void setBlurMap(bool blur){blurMap = blur;} 71 79 … … 95 103 */ 96 104 String materialName; 105 /** 106 @brief attenuation distance of the caustic 107 */ 97 108 float attenuation; 109 /** 110 @brief sets if triangles should be rendered into the caustic cubemap instead of sprites 111 */ 98 112 bool useTriangles; 113 /** 114 @brief sets if the caustic cubemap should be blurred (recommended if rendering caustic triangles) 115 */ 99 116 bool blurMap; 100 117 -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreChildPSystemRenderingRun.h
r1722 r2240 14 14 15 15 /** 16 @brief C olorCubeMapRenderingRun used in an OGRE environment.16 @brief ChildPsystemRenderingRun used in an OGRE environment. 17 17 */ 18 18 class OgreChildPSystemRenderingRun : public OgreRenderingRun, … … 28 28 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 29 29 @param updateInterval update frequency 30 @param materialName the name of the material should be used when rendering the choton hit map 30 @param resolution resolution of the impostor texture 31 @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal 32 @param childPSysScriptName the name of the particle system script 33 @param useOwnMaterial use the material that was defined in the particle script 34 @param materialName use this specific material while rendering the impostor 35 31 36 */ 32 37 OgreChildPSystemRenderingRun(OgreSharedRuns* sharedRuns, … … 45 50 */ 46 51 String getImpostorTextureName(){return name;} 47 52 //inherited 48 53 bool canJoin(RenderingRun* run) 49 54 { … … 51 56 return false; 52 57 } 58 53 59 void setNode(SceneNode* n){psysNode = n;} 54 60 Real getSmallSysRadius(){return sysRad;}
Note: See TracChangeset
for help on using the changeset viewer.