OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::PSSMShadowCameraSetup Class Reference

Parallel Split Shadow Map (PSSM) shadow camera setup. More...

#include <OgreShadowCameraSetupPSSM.h>

+ Inheritance diagram for Ogre::PSSMShadowCameraSetup:

Public Types

typedef vector< Real >::type SplitPointList
 

Public Member Functions

 PSSMShadowCameraSetup ()
 Constructor, defaults to 3 splits.
 
virtual ~PSSMShadowCameraSetup ()
 
void calculateSplitPoints (uint splitCount, Real nearDist, Real farDist, Real lambda=0.95, Real blend=0.125, Real fade=0.313)
 Calculate a new splitting scheme.
 
Real getMaxDistance () const
 
Real getMinDistance () const
 
virtual void getShadowCamera (const Ogre::SceneManager *sm, const Ogre::Camera *cam, const Ogre::Light *light, Ogre::Camera *texCam, size_t iteration, const Vector2 &viewportRealSize) const
 Returns a LiSPSM shadow camera with PSSM splits base on iteration.
 
const SplitPointListgetSplitBlendPoints () const
 Returns the calculated split blend points.
 
uint getSplitCount () const
 Get the number of splits.
 
const RealgetSplitFadePoint () const
 Returns the calculated split fade point.
 
Real getSplitPadding () const
 Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
 
const SplitPointListgetSplitPoints () const
 Returns the calculated split points.
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void setOptimalAdjustFactor (size_t splitIndex, Real factor)
 Set the LiSPSM optimal adjust factor for a given split (call after configuring splits).
 
void setSplitPadding (Real pad)
 Set the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
 
void setSplitPoints (const SplitPointList &newSplitPoints, Real blend=0.125, Real fade=0.313)
 Manually configure a new splitting scheme.
 

Detailed Description

Parallel Split Shadow Map (PSSM) shadow camera setup.

Remarks
A PSSM shadow system uses multiple shadow maps per light and maps each texture into a region of space, progressing away from the camera. As such it is most appropriate for directional light setups. This particular version also uses LiSPSM projection for each split to maximise the quality.
Note
Because PSSM uses multiple shadow maps per light, you will need to increase the number of shadow textures available (via SceneManager) to match the number of shadow maps required (default is 3 per light).

Member Typedef Documentation

◆ SplitPointList

Constructor & Destructor Documentation

◆ PSSMShadowCameraSetup()

Ogre::PSSMShadowCameraSetup::PSSMShadowCameraSetup ( )

Constructor, defaults to 3 splits.

◆ ~PSSMShadowCameraSetup()

virtual Ogre::PSSMShadowCameraSetup::~PSSMShadowCameraSetup ( )
virtual

Member Function Documentation

◆ calculateSplitPoints()

void Ogre::PSSMShadowCameraSetup::calculateSplitPoints ( uint  splitCount,
Real  nearDist,
Real  farDist,
Real  lambda = 0.95,
Real  blend = 0.125,
Real  fade = 0.313 
)

Calculate a new splitting scheme.

Parameters
splitCountThe number of splits to use
nearDistThe near plane to use for the first split
farDistThe far plane to use for the last split
lambdaFactor to use to reduce the split size
blendFactor to use to reduce the split seams
fadeFactor to use to fade out the last split

◆ getMaxDistance()

Real Ogre::ShadowCameraSetup::getMaxDistance ( ) const
inlineinherited

◆ getMinDistance()

Real Ogre::ShadowCameraSetup::getMinDistance ( ) const
inlineinherited

◆ getShadowCamera()

virtual void Ogre::PSSMShadowCameraSetup::getShadowCamera ( const Ogre::SceneManager sm,
const Ogre::Camera cam,
const Ogre::Light light,
Ogre::Camera texCam,
size_t  iteration,
const Vector2 viewportRealSize 
) const
virtual

Returns a LiSPSM shadow camera with PSSM splits base on iteration.

Reimplemented from Ogre::FocusedShadowCameraSetup.

◆ getSplitBlendPoints()

const SplitPointList & Ogre::PSSMShadowCameraSetup::getSplitBlendPoints ( ) const
inline

Returns the calculated split blend points.

◆ getSplitCount()

uint Ogre::PSSMShadowCameraSetup::getSplitCount ( ) const
inline

Get the number of splits.

◆ getSplitFadePoint()

const Real & Ogre::PSSMShadowCameraSetup::getSplitFadePoint ( ) const
inline

Returns the calculated split fade point.

◆ getSplitPadding()

Real Ogre::PSSMShadowCameraSetup::getSplitPadding ( ) const
inline

Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.

◆ getSplitPoints()

const SplitPointList & Ogre::PSSMShadowCameraSetup::getSplitPoints ( ) const
inline

Returns the calculated split points.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ setOptimalAdjustFactor()

void Ogre::PSSMShadowCameraSetup::setOptimalAdjustFactor ( size_t  splitIndex,
Real  factor 
)

Set the LiSPSM optimal adjust factor for a given split (call after configuring splits).

◆ setSplitPadding()

void Ogre::PSSMShadowCameraSetup::setSplitPadding ( Real  pad)
inline

Set the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.

◆ setSplitPoints()

void Ogre::PSSMShadowCameraSetup::setSplitPoints ( const SplitPointList newSplitPoints,
Real  blend = 0.125,
Real  fade = 0.313 
)

Manually configure a new splitting scheme.

Parameters
newSplitPointsA list which is splitCount + 1 entries long, containing the split points. The first value is the near point, the last value is the far point, and each value in between is both a far point of the previous split, and a near point for the next one.
blendFactor to use to reduce the split seams.
fadeFactor to use to fade out the last split.

The documentation for this class was generated from the following file: