OGRE: Ogre::FocusedShadowCameraSetup Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::FocusedShadowCameraSetup Class Reference
Core » Scene

Implements the uniform shadow mapping algorithm in focused mode. More...

`#include <OgreShadowCameraSetupFocused.h>`

Inheritance diagram for Ogre::FocusedShadowCameraSetup:
[legend]

## Public Member Functions
| FocusedShadowCameraSetup (bool useAggressiveRegion=true)
| ~FocusedShadowCameraSetup ()
void | getShadowCamera (const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const override
| Returns a uniform shadow camera with a focused view.
bool | getUseAggressiveFocusRegion () const
void | setUseAggressiveFocusRegion (bool aggressive)
| Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
Public Member Functions inherited from Ogre::DefaultShadowCameraSetup
| DefaultShadowCameraSetup ()
virtual | ~DefaultShadowCameraSetup ()
Public Member Functions inherited from Ogre::ShadowCameraSetup
virtual | ~ShadowCameraSetup ()
| Need virtual destructor in case subclasses use it.

## Static Public Member Functions
static ShadowCameraSetupPtr | create (bool useAggressiveRegion=true)
| Create an instance.
Static Public Member Functions inherited from Ogre::DefaultShadowCameraSetup
static ShadowCameraSetupPtr | create ()

## Detailed Description

Implements the uniform shadow mapping algorithm in focused mode.

Differs from the default shadow mapping projection in that it focuses the shadow map on the visible areas of the scene. This results in better shadow map texel usage, at the expense of some 'swimming' of the shadow texture on receivers as the basis is constantly being reevaluated.

Original implementation by Matthias Fink matth.nosp@m.ias..nosp@m.fink@.nosp@m.web..nosp@m.de, 2006.

## Constructor & Destructor Documentation

## ◆ FocusedShadowCameraSetup()

Ogre::FocusedShadowCameraSetup::FocusedShadowCameraSetup | ( | bool | useAggressiveRegion = true | ) |

Deprecated
  use create()

## ◆ ~FocusedShadowCameraSetup()

Ogre::FocusedShadowCameraSetup::~FocusedShadowCameraSetup | ( |  | ) |

## Member Function Documentation

## ◆ create()

ShadowCameraSetupPtr Ogre::FocusedShadowCameraSetup::create | ( | bool | useAggressiveRegion = true | ) |
| inlinestatic

Create an instance.

There are 2 approaches that can be used to define the focus region, the more aggressive way introduced by Wimmer et al, or the original way as described in Stamminger et al. Wimmer et al's way tends to come up with a tighter focus region but in rare cases (mostly highly glancing angles) can cause some shadow casters to be clipped incorrectly. By default the more aggressive approach is used since it leads to significantly better results in most cases, but if you experience clipping issues, you can use the less aggressive version.

Parameters

  useAggressiveRegion | True to use the more aggressive approach, false otherwise.

## ◆ getShadowCamera()

void Ogre::FocusedShadowCameraSetup::getShadowCamera | ( | const SceneManager * | sm,
|  | const Camera * | cam,
|  | const Viewport * | vp,
|  | const Light * | light,
|  | Camera * | texCam,
|  | size_t | iteration ) const
| overridevirtual

Returns a uniform shadow camera with a focused view.

Reimplemented from Ogre::DefaultShadowCameraSetup.

Reimplemented in Ogre::LiSPSMShadowCameraSetup, and Ogre::PSSMShadowCameraSetup.

## ◆ setUseAggressiveFocusRegion()

void Ogre::FocusedShadowCameraSetup::setUseAggressiveFocusRegion | ( | bool | aggressive | ) |
| inline

Sets whether or not to use the more aggressive approach to deciding on the focus region or not.

## ◆ getUseAggressiveFocusRegion()

bool Ogre::FocusedShadowCameraSetup::getUseAggressiveFocusRegion | ( |  | ) | const
| inline

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

- OgreShadowCameraSetupFocused.h