Changeset 2240 for GTP/trunk/Lib/Illum
- Timestamp:
- 03/13/07 09:27:17 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule
- Files:
-
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/IlluminationManager.h
r780 r2240 6 6 @brief Base abstract class of the illumination manager. 7 7 8 The illumination manager is responsible for refreshing rendering techniques connected to visible renderables, 9 and to render the scene with these updated resources. 8 The illumination manager is responsible for refreshing rendering techniques connected to visible renderables. 10 9 It also has the resposibility to manage shared runs, to join and split them if needed. 11 10 */ … … 20 19 @brief The function to be called to render one frame. 21 20 22 This is the main refreshing function. It seasrches for visible objects, manages shared runs , updates render techniques and23 finally renders the scene to framebuffer.21 This is the main refreshing function. It seasrches for visible objects, manages shared runs and updates render techniques. 22 It should be called after all animations are done and before rendering to the frame buffer. 24 23 25 24 @param frameNumber current framenumber -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/CausticCasterRenderTechnique.h
r949 r2240 6 6 7 7 This technique defines that the given object needs a caustic photon map and a caustic cubemap. 8 The se resources will be updated by caustic recievers.8 The caustic cube map will be used by caustic recievers. 9 9 */ 10 10 class CausticCasterRenderTechnique : virtual public RenderTechnique -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/ColorCubeMapRenderTechnique.h
r1930 r2240 21 21 @param angleTolerance angle tolerance used in face skip 22 22 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 23 @param renderSelf sets if the object should be rendered to the cube map 24 @param renderEnvironment sets if the environment should be rendered to the cube map 25 @param layer the layer of this cubemap 23 26 @param parentRenderable the object to operate on 24 27 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to … … 49 52 //inherited 50 53 void runChanged(RenderingRunType runType, RenderingRun* run); 54 //inherited 51 55 void runUpdated(RenderingRunType runType, RenderingRun* run); 52 56 53 57 protected: 54 virtual void colorCubeMapRunChanged(RenderingRun* run) = 0; 58 /** 59 @brief Called if the color cubemap rendering run object changes. 60 61 @param run pointer to the new rendering run object 62 */ 63 virtual void colorCubeMapRunChanged(RenderingRun* run) = 0; 64 /** 65 @brief Called if the color cubemap rendering run object is updated. 66 67 @param run pointer to the rendering run object 68 */ 55 69 virtual void colorCubeMapRunUpdated(RenderingRun* run) = 0; 56 70 }; -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/ConvolvedCubeMapRenderTechnique.h
r1722 r2240 24 24 @param angleTolerance angle tolerance used in face skip 25 25 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 26 @param renderSelf sets if the object should be rendered to the cube map 27 @param renderEnvironment sets if the environment should be rendered to the cube map 26 28 @param parentRenderable the object to operate on 27 29 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to … … 54 56 55 57 protected: 56 58 /** 59 @brief The resolution of the downsampled cubemap created by this run. 60 */ 57 61 unsigned int reducedCubeMapResolution; 58 62 /** 59 @brief Called if the changed run is a ColorCubeMapRenderingRun.63 @brief Called if the changed run is a ReducedCubeMapRenderingRun. 60 64 61 @param run pointer to the changed ColorCubeMapRenderingRun65 @param run pointer to the changed ReducedCubeMapRenderingRun 62 66 */ 63 67 virtual void reducedCubeMapRunChanged(RenderingRun* run) = 0; 64 68 /** 65 @brief Called if the changed run is a C olorCubeMapRenderingRun.69 @brief Called if the changed run is a CubeMapRenderingRun (containing colors of the environment). 66 70 67 @param run pointer to the changed C olorCubeMapRenderingRun71 @param run pointer to the changed CubeMapRenderingRun 68 72 */ 69 73 virtual void colorCubeMapRunChanged(RenderingRun* run) = 0; 70 74 /** 71 @brief Creates a ColorCubeMapRenderingRun.75 @brief Creates a ReducedCubeMapRenderingRun. 72 76 73 @return the new ColorCubeMapRenderingRun instance.77 @return the new ReducedCubeMapRenderingRun instance. 74 78 */ 75 79 virtual RenderingRun* createReducedCubeMapRun() = 0; -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/CubeMapRenderTechnique.h
r1930 r2240 3 3 4 4 /** 5 @brief Base abstract class of rendering a c olor cube map.5 @brief Base abstract class of rendering a cube map. 6 6 7 This technique defines that the final rendering of an object needs a cubmap of the colors of the surrounding environment.7 This technique defines that the final rendering of an object needs a cubmap of the surrounding environment and/or the object itself. 8 8 */ 9 9 class CubeMapRenderTechnique : virtual public RenderTechnique … … 21 21 @param angleTolerance angle tolerance used in face skip 22 22 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 23 @param renderSelf sets if the object should be rendered to the cube map 24 @param renderEnvironment sets if the environment should be rendered to the cube map 25 @param layer the layer of this cubemap 23 26 @param parentRenderable the object to operate on 24 27 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to … … 40 43 ~CubeMapRenderTechnique(); 41 44 45 //inherited 42 46 void runChanged(RenderingRunType runType, RenderingRun* run); 47 //inherited 43 48 void runUpdated(RenderingRunType runType, RenderingRun* run); 44 49 … … 84 89 */ 85 90 unsigned long startFrame; 91 /** 92 @brief Sets if the object should be rendered to the cube map 93 */ 86 94 bool renderSelf; 95 /** 96 @brief Sets if the environment should be rendered to the cube map 97 */ 87 98 bool renderEnvironment; 99 /** 100 @brief The layer of the cubemap. 101 102 This extension was created to achieve effect such as multiple reflections and refractions 103 that require more complete sampling of the scene. 104 With this extension we can render the environment into several cubemap layers eg. with depth peeling. 105 */ 88 106 int layer; 107 /** 108 @brief The exact run type of this run (according to the actual layer). 109 */ 89 110 RenderingRunType cubemapLayer; 90 111 /** 112 @brief Creates a CubeMapRenderingRun. 113 114 @return the new CubeMapRenderingRun instance. 115 */ 91 116 virtual RenderingRun* createCubeMapRun() = 0; 92 virtual void cubeMapRunChanged(RenderingRun* run) = 0; 117 /** 118 @brief Called if the changed run is a CubeMapRenderingRun. 119 120 @param run pointer to the new CubeMapRenderingRun 121 */ 122 virtual void cubeMapRunChanged(RenderingRun* run) = 0; 123 /** 124 @brief Called if the updated run is a CubeMapRenderingRun. 125 126 @param run pointer to the updated CubeMapRenderingRun 127 */ 93 128 virtual void cubeMapRunUpdated(RenderingRun* run) = 0; 94 129 }; -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/DepthShadowRecieverRenderTechnique.h
r780 r2240 18 18 TechniqueGroup* parentTechniqueGroup 19 19 ); 20 ~DepthShadowRecieverRenderTechnique(); 21 22 20 ~DepthShadowRecieverRenderTechnique(); 23 21 24 22 protected: -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/DistanceCubeMapRenderTechnique.h
r1725 r2240 21 21 @param angleTolerance angle tolerance used in face skip 22 22 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 23 @param renderSelf sets if the object should be rendered to the cube map 24 @param renderEnvironment sets if the environment should be rendered to the cube map 25 @param layer the layer of this cubemap 23 26 @param parentRenderable the object to operate on 24 27 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to … … 55 58 56 59 /** 57 @brief Called if the changed run is a C olorCubeMapRenderingRun.60 @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer). 58 61 59 @param run pointer to the changed C olorCubeMapRenderingRun62 @param run pointer to the changed CubeMapRenderingRun 60 63 */ 61 64 virtual void distanceCubeMapRunChanged(RenderingRun* run) = 0; 62 65 /** 63 @brief Called if the changed run is a C olorCubeMapRenderingRun.66 @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer). 64 67 65 @param run pointer to the changed C olorCubeMapRenderingRun68 @param run pointer to the changed CubeMapRenderingRun 66 69 */ 67 70 virtual void distanceCubeMapRunUpdated(RenderingRun* run) = 0; -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/HierarchicalParticleSystemTechnique.h
r1425 r2240 3 3 4 4 /** 5 @brief Base abstract class of rendering a particle system with the spherical billboard method. 5 @brief Base abstract class of rendering a hierarchical particle system. 6 7 A hierarchical particle system is a particle system made out of a smaller particle system. 8 It renders an image of the smaller particle system and multiplies this image to achieve a bigger particle system. 9 This way fewer computation is needed to simulate large number of particles, while the trick is usually unnoticable. 6 10 */ 7 11 class HierarchicalParticleSystemTechnique : virtual public RenderTechnique … … 11 15 @brief Constructor. 12 16 13 @param parentRenderable the object to operate on 14 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 17 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 18 @param impostorUpdateInterval update frequency of the impostor texture (image of the smaller system) 19 @param impostorResolution resolution of the impostor texture 20 @param useDistCalc flag to skip impostor update if object is far away (//not used) 21 @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal 22 @param parentRenderable the object to operate on 23 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 15 24 */ 16 25 HierarchicalParticleSystemTechnique( … … 25 34 ~HierarchicalParticleSystemTechnique(); 26 35 36 //inherited 27 37 void update(unsigned long frameNum); 28 29 38 //inherited 30 39 void runChanged(RenderingRunType runType, RenderingRun* run); 40 //inherited 31 41 void runUpdated(RenderingRunType runType, RenderingRun* run); 32 42 33 43 protected: 44 /** 45 @brief update frequency of the impostor texture (image of the smaller system) 46 */ 34 47 unsigned long impostorUpdateInterval; 48 /** 49 @brief resolution of the impostor texture 50 */ 35 51 unsigned int impostorResolution; 36 52 /** … … 38 54 */ 39 55 unsigned long startFrame; 56 /** 57 @brief flag to skip impostor update if object is far away (//not used) 58 */ 40 59 bool useDistCalc; 60 /** 61 @brief sets if the impostor should be rendered with a perspective projection or orthogonal 62 */ 41 63 bool perspectiveRendering; 64 /** 65 @brief Creates the ChildParticleSystemRenderingRun needed by this technique. 42 66 67 @return pointer to the ChildParticleSystemRenderingRun created instance 68 */ 43 69 virtual RenderingRun* createChildPSysRenderingRun()=0; 70 /** 71 @brief Called if the impostor rendering run changed. 72 73 @param run pointer to the new ChildParticleSystemRenderingRun instance to use 74 */ 44 75 virtual void impostorChanged(RenderingRun* run) = 0; 76 /** 77 @brief Called if the impostor rendering run is updated. 78 79 @param run pointer to the updated ChildParticleSystemRenderingRu. 80 */ 45 81 virtual void impostorUpdated(RenderingRun* run) = 0; 46 82 -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/IllumVolumeRenderTechnique.h
r1425 r2240 3 3 4 4 /** 5 @brief Base abstract class of rendering a particle system with the spherical billboard method. 5 @brief Base abstract class of rendering a light volume of a particle system. 6 7 Light volumes are used when self shadowing of particle systems should be simulated. 8 Each layer of the volume represents the amount of transmitted light. The current implementation uses four grayscale layers, 9 and places these layers to the four channel of the light volume texture. 6 10 */ 7 11 class IllumVolumeRenderTechnique : virtual public RenderTechnique … … 11 15 @brief Constructor. 12 16 13 @param parentRenderable the object to operate on 14 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 17 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 18 @param illumVolumeUpdateInterval the update frequency of the light volume 19 @param illumTextureResolution the resolution of the light volume texture 20 @param textureDepth the number of layers to use (should be set to 1) 21 @param useDistCalc flag to skip updates if the shaded particle system is far away (not used) 22 @param useHierarchicalImpostor set this flag to true if the particle system is a hierarchical particle system 23 @param parentRenderable the object to operate on 24 @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to 15 25 */ 16 26 IllumVolumeRenderTechnique( … … 26 36 ~IllumVolumeRenderTechnique(); 27 37 38 //inherited 28 39 void update(unsigned long frameNum); 29 30 40 //inherited 31 41 void runChanged(RenderingRunType runType, RenderingRun* run); 42 //inherited 32 43 void runUpdated(RenderingRunType runType, RenderingRun* run); 33 44 34 45 protected: 46 /** 47 @brief the update frequency of the light volume 48 */ 35 49 unsigned long illumVolumeUpdateInterval; 50 /** 51 @brief the resolution of the light volume texture 52 */ 36 53 unsigned int illumTextureResolution; 54 /** 55 @brief the number of layers to use (should be set to 1) 56 */ 37 57 unsigned int textureDepth; 38 58 /** … … 40 60 */ 41 61 unsigned long startFrame; 62 /** 63 @brief flag to skip updates if the shaded particle system is far away (not used) 64 */ 42 65 bool useDistCalc; 66 /** 67 @brief set this flag to true if the particle system is a hierarchical particle system 68 */ 43 69 bool useHierarchicalImpostor; 44 70 71 /** 72 @brief creates a light volume rendering run needed by this technique 73 74 @return pointer to the created LightVolumeRenderingRun instance 75 */ 45 76 virtual RenderingRun* createLightVolumeRenderingRun()=0; 77 /** 78 @brief Called if the LightVolumeRenderingRun is chaged 79 80 @param pointer to the new LightVolumeRenderingRun instance to use 81 */ 46 82 virtual void lightVolumeChanged(RenderingRun* run) = 0; 83 /** 84 @brief Called if the LightVolumeRenderingRun is updated 85 86 @param pointer to the updated LightVolumeRenderingRun instance 87 */ 47 88 virtual void lightVolumeUpdated(RenderingRun* run) = 0; 89 /** 90 @brief Called if the ChildParticleSystemRenderingRun is chaged 91 92 Only called if this particle system is a hierarchical particle system. 93 94 @param pointer to the new ChildParticleSystemRenderingRun instance to use 95 */ 48 96 virtual void hierarchicalImpostorUpdated(RenderingRun* run) = 0; 49 97 -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/SBBRenderTechnique.h
r780 r2240 4 4 /** 5 5 @brief Base abstract class of rendering a particle system with the spherical billboard method. 6 7 This technique only defines that the rendering of the object needs depth information of the scene from the player camera's view. 6 8 */ 7 9 class SBBRenderTechnique : virtual public RenderTechnique -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRun.h
r1722 r2240 45 45 virtual class OgreRenderingRun* asOgreRenderingRun(){return 0;} 46 46 47 /** 48 @brief Returns true if two runs can be joined. 49 50 In some cases special requirements should stand to join two runs (even if they have the same type). 51 Eg.: two caustic cube map generation technique should only be joined if they use the same material 52 when rendering the caustic cubemap. 53 */ 47 54 virtual bool canJoin(RenderingRun* run){return true;} 48 55 … … 51 58 /** 52 59 @brief Returns if this run needs update 60 61 This tipically depends on the upate interval and the starting frame number. 53 62 54 63 @param frameNum current frame number -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/ChildPSystemRenderingRun.h
r1055 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process of a p hoton hit map.5 @brief Base abstract class that defines a rendering process of a particle system impostor image. 6 6 7 A photon hit map stores the directions where the incoming photons are refracted by a caustic emitter object. 8 One pixel of the photon map represents one photon hit, hte direction is encoded in the RGB channels. 9 If the alpha channel has zero value, the hit is invalid. 7 This impostor can be used as a texture for ither particle systems. This rendering method is called hieararchical particle system. 10 8 */ 11 9 class ChildPsystemRenderingRun : virtual public RenderingRun … … 15 13 @brief Constructor. 16 14 15 @param resolution the resolution of the impostor image 16 @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal 17 17 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 18 18 @param updateInterval update frequency … … 31 31 protected: 32 32 /** 33 @brief the resolution of the photonmap texture that was created by this run33 @brief the resolution of the impostor image 34 34 */ 35 35 unsigned int resolution; 36 /** 37 @brief sets if the impostor should be rendered with a perspective projection or orthogonal 38 */ 36 39 bool perspectiveRendering; 37 40 //inherited 38 41 virtual void updateFrame(unsigned long frameNum) = 0; 39 42 /** 40 @brief Creates a photon hit map.43 @brief Creates an impostor texture that can be used as a rendertarget during impostor rendering. 41 44 */ 42 45 virtual inline void createImpostorTexture() = 0; -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/CubeMapRenderingRun.h
r1722 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process of a color-cubemap. 6 7 A color cubemap is a cubemap of the colors of the surrounding environment. 5 @brief Base abstract class that defines a rendering process of a cubemap. 8 6 */ 9 7 class CubeMapRenderingRun : virtual public RenderingRun … … 21 19 @param angleTolerance angle tolerance used in face skip 22 20 @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame 23 21 @param renderSelf sets if the object should be rendered to the cube map 22 @param renderEnvironment sets if the environment should be rendered to the cube map 24 23 */ 25 24 CubeMapRenderingRun(unsigned long startFrame, … … 72 71 */ 73 72 float angleTolerance; 73 /** 74 @brief sets if the object should be rendered to the cube map 75 */ 74 76 bool renderSelf; 77 /** 78 @brief sets if the environment should be rendered to the cube map 79 */ 75 80 bool renderEnvironment; 76 81 -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/LightVolumeRenderingRun.h
r1425 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process of a photon hit map.5 @brief Base abstract class that defines a rendering process of a light volume texture. 6 6 7 A photon hit map stores the directions where the incoming photons are refracted by a caustic emitter object.8 One pixel of the photon map represents one photon hit, hte direction is encoded in the RGB channels.9 If the alpha channel has zero value, the hit is invalid.7 Light volumes are used when self shadowing of particle systems should be simulated. 8 Each layer of the volume represents the amount of transmitted light. The current implementation uses four grayscale layers, 9 and places these layers to the four channel of the light volume texture. 10 10 */ 11 11 class LightVolumeRenderingRun : virtual public RenderingRun … … 17 17 @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames 18 18 @param updateInterval update frequency 19 @param resolution the resolution of the light volume texture 20 @param textureDepth the number of layers (should be set to 1) 19 21 */ 20 22 LightVolumeRenderingRun(unsigned long startFrame, … … 32 34 virtual void updateFrame(unsigned long frameNum) = 0; 33 35 /** 34 @brief Creates a photon hitmap.36 @brief Creates a light volume map. 35 37 */ 36 38 virtual inline void createLightVolumeMap() = 0; 37 39 /** 38 @brief the resolution of the photonmap texture that was created by this run40 @brief the resolution of the light volume map 39 41 */ 40 42 unsigned int resolution; 43 /** 44 @brief number of layers (should be 1) 45 */ 41 46 unsigned int textureDepth; 42 47 -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/PhaseTextureRenderingRun.h
r1425 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process that creates depth map.5 @brief Base abstract class that defines a rendering process that creates phase texture. 6 6 7 The depth map stores the scene's camera space z coordinates (rendered from the player's view). 7 The phase texture can be used as a look-up table during rendering of partcipating media. 8 If the texture is created once it can be saved and reused, so this run is usually not needed, only runned once. 9 This texture is addressed as the following: the u coordinates represents the symmetry of scattering 10 (negative if backward scattering, positive if forward scattering and zero if equally scaterring in the forward and in the backward directions) 11 ; the v coordinates represent the cosine of the angle between the incoming and outgoing directions. 8 12 */ 9 13 class PhaseTextureRenderingRun : virtual public RenderingRun … … 12 16 /** 13 17 @brief Constructor. 18 19 @param resolutionX width of the texture 20 @param resolutionY height of the texture 14 21 */ 15 22 PhaseTextureRenderingRun(unsigned int resolutionX, … … 22 29 23 30 protected: 31 /** 32 @brief width of the texture 33 */ 24 34 unsigned int resolutionX; 35 /** 36 @brief height of the texture 37 */ 25 38 unsigned int resolutionY; 26 39 /** -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/ReducedCubeMapRenderingRun.h
r780 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process of a reduced sized color-cubemap.5 @brief Base abstract class that defines a rendering process of a downsampled color-cubemap. 6 6 7 The resulting cubemap is a lower resolution variation of acolor cube map. It is created with averaging the original cubemap.7 The resulting cubemap is a lower resolution variation of the color cube map. It is created with averaging the original cubemap. 8 8 The lower resolution cubemap can be convolved faster and can efficiently be used in effects like diffuse reflection. 9 9 */ -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderingRuns/SceneCameraDepthRenderingRun.h
r874 r2240 3 3 4 4 /** 5 @brief Base abstract class that defines a rendering process that creates depth map .5 @brief Base abstract class that defines a rendering process that creates depth map fro the camera. 6 6 7 7 The depth map stores the scene's camera space z coordinates (rendered from the player's view). -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/SharedRuns.h
r2189 r2240 10 10 11 11 If a new class is derived from RenderingRun, this enum should be extended. 12 Th istypes are used in messages sent when a run changes or updates.12 These types are used in messages sent when a run changes or updates. 13 13 */ 14 14 enum RenderingRunType … … 47 47 Technique resources which can be shared between several techniques or objects are managed by SharedRuns. 48 48 These SharedRuns store the shared resources. They also act like nodes of a binary tree, as separate 49 SharedRuns can also be joined if for example the objects for w itch they store resources are close enough so49 SharedRuns can also be joined if for example the objects for which they store resources are close enough so 50 50 even one shared resources is enough for the given objects. 51 51 */ … … 57 57 */ 58 58 SharedRuns(void); 59 59 /** 60 &brief Returns true if this shared run object has a given run type. 61 62 It returns true if the shared run object node has a rendering run object with the given type. 63 It checks only the current node of the tree, no children nodes are searched for existing rendering runs. 64 65 @param runType enum, type of the RenderingRun to search for 66 @return search result 67 */ 60 68 virtual bool hasOwnRun(RenderingRunType runType) = 0; 61 69 /** -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/TechniqueGroup.h
r1055 r2240 4 4 5 5 /** 6 @brief Base abstract class for a collection techniques.6 @brief Base abstract class for a collection of techniques. 7 7 8 8 This is a helper class, to collect RenderTechnique instances bound to a single renderable. … … 23 23 Used after creating a new TechniqueGroup. 24 24 25 @param sharedRuns the SharedRun instance theRenderTechniques will use.25 @param sharedRuns pointer to the SharedRun instance this RenderTechniques will use. 26 26 */ 27 27 void addSharedRun(SharedRuns* sharedRuns){parentSharedRuns = sharedRuns; … … 30 30 @brief Retrieves the shared runs. 31 31 32 @result the SharedRun instance the RenderTechniques use.32 @result pointer to the SharedRun instance this RenderTechniques uses. 33 33 */ 34 34 SharedRuns* getSharedRuns(){return parentSharedRuns;} … … 46 46 virtual void update(unsigned long frameNum) = 0; 47 47 /** 48 @brief Called after one of he sharedruns changes.48 @brief Called after one of the rendering runs changes. 49 49 50 50 This message will be forwarded to each RenderTechique. … … 55 55 virtual void runChanged(RenderingRunType runType, RenderingRun* run) = 0; 56 56 /** 57 @brief Called after one of he sharedruns updates.57 @brief Called after one of the rendering runs updates. 58 58 59 59 This message will be forwarded to each RenderTechique. -
GTP/trunk/Lib/Illum/IllumModule/IllumModule/scripts/illummodule.7.10.vcproj
r2027 r2240 285 285 </File> 286 286 </Filter> 287 <Filter288 Name="Resource Files"289 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">290 <File291 RelativePath="..\..\..\..\..\..\..\EGDemoGame\Media\materials\scripts\car.material">292 </File>293 <File294 RelativePath="..\..\..\..\..\..\..\EGDemoGame\Media\materials\programs\CarReflections.hlsl">295 </File>296 </Filter>297 287 </Filter> 298 288 </Files> -
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;} -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp
r2200 r2240 84 84 phaseTextureSize = 256; 85 85 useLISPSM = false; 86 useVSM = false;86 // useVSM = false; 87 87 blurSM = false; 88 88 focusingSM = true;
Note: See TracChangeset
for help on using the changeset viewer.