OGRE
1.10.12
Object-Oriented Graphics Rendering Engine
|
Parallel Split Shadow Map (PSSM) shadow camera setup. More...
#include <OgreShadowCameraSetupPSSM.h>
Public Types | |
typedef vector< Real >::type | OptimalAdjustFactorList |
typedef vector< Real >::type | SplitPointList |
Public Member Functions | |
PSSMShadowCameraSetup () | |
Constructor, defaults to 3 splits. More... | |
virtual | ~PSSMShadowCameraSetup () |
void | calculateSplitPoints (uint splitCount, Real nearDist, Real farDist, Real lambda=0.95) |
Calculate a new splitting scheme. More... | |
virtual Degree | getCameraLightDirectionThreshold () const |
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'flattened', since coincident light and camera projections cause problems with the perspective skew. More... | |
Real | getOptimalAdjustFactor (size_t splitIndex) const |
Returns the optimal adjust factor for a given split. More... | |
Real | getOptimalAdjustFactor () const |
Overridden, recommended internal use only since depends on current iteration. More... | |
virtual void | getShadowCamera (const Ogre::SceneManager *sm, const Ogre::Camera *cam, const Ogre::Viewport *vp, const Ogre::Light *light, Ogre::Camera *texCam, size_t iteration) const |
Returns a LiSPSM shadow camera with PSSM splits base on iteration. More... | |
uint | getSplitCount () const |
Get the number of splits. More... | |
Real | getSplitPadding () const |
Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'. More... | |
const SplitPointList & | getSplitPoints () const |
Returns the calculated split points. More... | |
bool | getUseAggressiveFocusRegion () const |
virtual bool | getUseSimpleOptimalAdjust () const |
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true) More... | |
virtual void | setCameraLightDirectionThreshold (Degree angle) |
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'flattened', since coincident light and camera projections cause problems with the perspective skew. More... | |
void | setOptimalAdjustFactor (size_t splitIndex, Real factor) |
Set the LiSPSM optimal adjust factor for a given split (call after configuring splits). More... | |
virtual void | setOptimalAdjustFactor (Real n) |
Adjusts the parameter n to produce optimal shadows. More... | |
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'. More... | |
void | setSplitPoints (const SplitPointList &newSplitPoints) |
Manually configure a new splitting scheme. More... | |
void | setUseAggressiveFocusRegion (bool aggressive) |
Sets whether or not to use the more aggressive approach to deciding on the focus region or not. More... | |
virtual void | setUseSimpleOptimalAdjust (bool s) |
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true) More... | |
Parallel Split Shadow Map (PSSM) shadow camera setup.
typedef vector<Real>::type Ogre::PSSMShadowCameraSetup::SplitPointList |
typedef vector<Real>::type Ogre::PSSMShadowCameraSetup::OptimalAdjustFactorList |
Ogre::PSSMShadowCameraSetup::PSSMShadowCameraSetup | ( | ) |
Constructor, defaults to 3 splits.
|
virtual |
void Ogre::PSSMShadowCameraSetup::calculateSplitPoints | ( | uint | splitCount, |
Real | nearDist, | ||
Real | farDist, | ||
Real | lambda = 0.95 |
||
) |
Calculate a new splitting scheme.
splitCount | The number of splits to use |
nearDist | The near plane to use for the first split |
farDist | The far plane to use for the last split |
lambda | Factor to use to reduce the split size |
void Ogre::PSSMShadowCameraSetup::setSplitPoints | ( | const SplitPointList & | newSplitPoints | ) |
Manually configure a new splitting scheme.
newSplitPoints | A 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. |
void Ogre::PSSMShadowCameraSetup::setOptimalAdjustFactor | ( | size_t | splitIndex, |
Real | factor | ||
) |
Set the LiSPSM optimal adjust factor for a given split (call after configuring splits).
|
inline |
Set the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
|
inline |
Get the padding factor to apply to the near & far distances when matching up splits to one another, to avoid 'cracks'.
|
inline |
Get the number of splits.
|
virtual |
Returns a LiSPSM shadow camera with PSSM splits base on iteration.
Reimplemented from Ogre::LiSPSMShadowCameraSetup.
|
inline |
Returns the calculated split points.
|
inline |
Returns the optimal adjust factor for a given split.
|
virtual |
Overridden, recommended internal use only since depends on current iteration.
Reimplemented from Ogre::LiSPSMShadowCameraSetup.
|
inlinevirtualinherited |
Adjusts the parameter n to produce optimal shadows.
n | The adjustment factor - default is 0.1f. |
|
inlinevirtualinherited |
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is true)
|
inlinevirtualinherited |
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is true)
|
virtualinherited |
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'flattened', since coincident light and camera projections cause problems with the perspective skew.
|
virtualinherited |
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'flattened', since coincident light and camera projections cause problems with the perspective skew.
|
inlineinherited |
Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
aggressive | True to use the more aggressive approach, false otherwise. |
|
inlineinherited |