chrono::irrlicht::EffectHandler Class Reference

Description

Main effect handling class, use this to apply shadows and effects.

#include <ChIrrEffects.h>

Public Member Functions

 EffectHandler (irr::IrrlichtDevice *irrlichtDevice, const irr::core::dimension2du &screenRTTSize=irr::core::dimension2du(0, 0), const bool useVSMShadows=false, const bool useRoundSpotLights=false, const bool use32BitDepthBuffers=false)
 
 ~EffectHandler ()
 Destructor.
 
void addShadowLight (const SShadowLight &shadowLight)
 Adds a shadow light. Check out the shadow light constructor for more information.
 
SShadowLight & getShadowLight (irr::u32 index)
 Retrieves a reference to a shadow light. You may get the max amount from getShadowLightCount.
 
irr::u32 getShadowLightCount () const
 Retrieves the current number of shadow lights.
 
irr::video::ITexture * getShadowMapTexture (const irr::u32 resolution, const bool secondary=false)
 Retrieves the shadow map texture for the specified square shadow map resolution. More...
 
irr::video::ITexture * getDepthMapTexture ()
 Retrieves the screen depth map texture if the depth pass is enabled. More...
 
void addNodeToDepthPass (irr::scene::ISceneNode *node)
 This function is now unrelated to shadow mapping. More...
 
void removeNodeFromDepthPass (irr::scene::ISceneNode *node)
 This function is now unrelated to shadow mapping. More...
 
void enableDepthPass (bool enableDepthPass)
 Enables/disables an additional pass before applying post processing effects (If there are any) which records screen depth info to the depth buffer for use with post processing effects that require screen depth info, such as SSAO or DOF. More...
 
void removeShadowFromNode (irr::scene::ISceneNode *node)
 Removes shadows from a scene node.
 
void excludeNodeFromLightingCalculations (irr::scene::ISceneNode *node)
 
void update (irr::video::ITexture *outputTarget=0)
 Updates the effects handler. More...
 
void addShadowToNode (irr::scene::ISceneNode *node, E_FILTER_TYPE filterType=EFT_NONE, E_SHADOW_MODE shadowMode=ESM_BOTH)
 Adds a shadow to the scene node. More...
 
irr::f32 getTime ()
 Returns the device time divided by 100, for use with the shader callbacks.
 
void setClearColour (irr::video::SColor ClearCol)
 Sets the scene clear color, for when the scene is cleared before smgr->drawAll().
 
void addPostProcessingEffect (irr::s32 MaterialType, IPostProcessingRenderCallback *callback=0)
 A very easy to use post processing function. More...
 
void setPostProcessingRenderCallback (irr::s32 MaterialType, IPostProcessingRenderCallback *callback=0)
 Sets the IPostProcessingRenderCallback for the specified post processing effect. More...
 
void removePostProcessingEffect (irr::s32 MaterialType)
 Removes the first encountered post processing effect with the specified material type.
 
irr::s32 addPostProcessingEffectFromFile (const irr::core::stringc &filename, IPostProcessingRenderCallback *callback=0)
 Adds a post processing effect by reading a pixel shader from a file. More...
 
void setPostProcessingEffectConstant (const irr::s32 materialType, const irr::core::stringc &name, const irr::f32 *data, const irr::u32 count)
 Sets a shader parameter for a post-processing effect. More...
 
const CScreenQuadgetScreenQuad ()
 Returns the screen quad scene node. More...
 
void setActiveSceneManager (irr::scene::ISceneManager *smgrIn)
 Sets the active scene manager.
 
irr::scene::ISceneManager * getActiveSceneManager ()
 Gets the active scene manager.
 
void setPostProcessingUserTexture (irr::video::ITexture *userTexture)
 This allows the user to specify a custom, fourth texture to be used in the post-processing effects. More...
 
void setAmbientColor (irr::video::SColor ambientColour)
 Sets the global ambient color for shadowed scene nodes.
 
irr::video::SColor getAmbientColor () const
 Gets the global ambient color.
 
irr::video::ITexture * generateRandomVectorTexture (const irr::core::dimension2du &dimensions, const irr::core::stringc &name="randVec")
 Generates a randomized texture composed of uniformly distributed 3 dimensional vectors.
 
void setScreenRenderTargetResolution (const irr::core::dimension2du &resolution)
 Sets a new screen render target resolution.
 
irr::IrrlichtDevice * getIrrlichtDevice ()
 Returns the device that this EffectHandler was initialized with.
 

Member Function Documentation

◆ getDepthMapTexture()

irr::video::ITexture* chrono::irrlicht::EffectHandler::getDepthMapTexture ( )
inline

Retrieves the screen depth map texture if the depth pass is enabled.

This is unrelated to the shadow map, and is meant to be used for post processing effects that require screen depth info, eg. DOF or SSAO.

◆ getScreenQuad()

const CScreenQuad& chrono::irrlicht::EffectHandler::getScreenQuad ( )
inline

Returns the screen quad scene node.

This is not required in any way, but some advanced users may want to adjust its material settings accordingly.

◆ setPostProcessingRenderCallback()

void chrono::irrlicht::EffectHandler::setPostProcessingRenderCallback ( irr::s32  MaterialType,
IPostProcessingRenderCallback *  callback = 0 
)
inline

Sets the IPostProcessingRenderCallback for the specified post processing effect.

The old callback if previously set will be automatically deleted.

◆ setPostProcessingUserTexture()

void chrono::irrlicht::EffectHandler::setPostProcessingUserTexture ( irr::video::ITexture *  userTexture)
inline

This allows the user to specify a custom, fourth texture to be used in the post-processing effects.

See addPostProcessingEffect for more info.


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_irrlicht/ChIrrEffects.h