OGRE-Next: Ogre::ForwardPlusBase Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::ForwardPlusBase Class Referenceabstract
Core » Resources

ForwardPlusBase. More...

`#include <OgreForwardPlusBase.h>`

Inheritance diagram for Ogre::ForwardPlusBase:
[legend]

## Classes
struct | CachedGridBuffer

## Public Types
typedef vector< CachedGridBuffer >::type | CachedGridBufferVec
enum | ForwardPlusMethods { MethodForward3D , MethodForwardClustered , NumForwardPlusMethods }

## Public Member Functions
| ForwardPlusBase (SceneManager *sceneManager, bool decalsEnabled, bool cubemapProbesEnabled)
virtual | ~ForwardPlusBase ()
void | _changeRenderSystem (RenderSystem *newRs)
void | _releaseManualHardwareResources ()
virtual void | collectLights (Camera *camera)=0
virtual void | fillConstBufferData (Viewport *viewport, bool bRequiresTextureFlipping, uint32 renderTargetHeight, IdString shaderSyntax, bool instancedStereo, float *RESTRICT_ALIAS passBufferPtr) const =0
| Fills 'passBufferPtr' with the necessary data for ForwardPlusBase rendering.
virtual size_t | getConstBufferSize () const =0
| Returns the amount of bytes that fillConstBufferData is going to fill.
bool | getDebugMode () const
bool | getDecalsEnabled () const
bool | getEnableVpls () const
bool | getFadeAttenuationRange () const
bool | getFineLightMaskGranularity () const
virtual ForwardPlusMethods | getForwardPlusMethod () const =0
ReadOnlyBufferPacked * | getGlobalLightListBuffer (const Camera *camera) const
| Cache the return value as internally we perform an O(N) search.
TexBufferPacked * | getGridBuffer (const Camera *camera) const
| Cache the return value as internally we perform an O(N) search.
bool | isCacheDirty (const Camera *camera) const
void | setDebugMode (bool debugMode)
| Turns on visualization of light cell occupancy.
void | setEnableVpls (bool enable)
void | setFadeAttenuationRange (bool fade)
| Attenuates the light by the attenuation range, causing smooth endings when at the end of the light range instead of a sudden sharp termination.
void | setFineLightMaskGranularity (bool useFineGranularity)
| Toggles whether light masks will be obeyed per object & per light by doing: if( movableObject->getLightMask() & light->getLightMask() ) doLighting( movableObject light ); Note this toggle only affects Forward+ lights.
virtual void | setHlmsPassProperties (Hlms *hlms)

## Static Public Attributes
static const uint32 | MaxCubemapProbeRq
static const uint32 | MaxDecalRq
static const uint32 | MinCubemapProbeRq
static const uint32 | MinDecalRq

## Detailed Description

ForwardPlusBase.

## Member Typedef Documentation

## ◆ CachedGridBufferVec

typedef vector<CachedGridBuffer>::type Ogre::ForwardPlusBase::CachedGridBufferVec

## Member Enumeration Documentation

## ◆ ForwardPlusMethods

enum Ogre::ForwardPlusBase::ForwardPlusMethods

Enumerator
MethodForward3D |
MethodForwardClustered |
NumForwardPlusMethods |

## Constructor & Destructor Documentation

## ◆ ForwardPlusBase()

Ogre::ForwardPlusBase::ForwardPlusBase | ( | SceneManager * | sceneManager,
|  | bool | decalsEnabled,
|  | bool | cubemapProbesEnabled )

## ◆ ~ForwardPlusBase()

virtual Ogre::ForwardPlusBase::~ForwardPlusBase | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ _changeRenderSystem()

void Ogre::ForwardPlusBase::_changeRenderSystem | ( | RenderSystem * | newRs | ) |

## ◆ _releaseManualHardwareResources()

void Ogre::ForwardPlusBase::_releaseManualHardwareResources | ( |  | ) |

## ◆ collectLights()

virtual void Ogre::ForwardPlusBase::collectLights | ( | Camera * | camera | ) |
| pure virtual

Implemented in Ogre::Forward3D, and Ogre::ForwardClustered.

## ◆ fillConstBufferData()

virtual void Ogre::ForwardPlusBase::fillConstBufferData | ( | Viewport * | viewport,
|  | bool | bRequiresTextureFlipping,
|  | uint32 | renderTargetHeight,
|  | IdString | shaderSyntax,
|  | bool | instancedStereo,
|  | float *RESTRICT_ALIAS | passBufferPtr ) const
| pure virtual

Fills 'passBufferPtr' with the necessary data for ForwardPlusBase rendering.

See also
  getConstBufferSize

Remarks
  Assumes 'passBufferPtr' is aligned to a vec4/float4 boundary.

Implemented in Ogre::Forward3D, and Ogre::ForwardClustered.

References RESTRICT_ALIAS.

## ◆ getConstBufferSize()

virtual size_t Ogre::ForwardPlusBase::getConstBufferSize | ( |  | ) | const
| pure virtual

Returns the amount of bytes that fillConstBufferData is going to fill.

Implemented in Ogre::Forward3D, and Ogre::ForwardClustered.

## ◆ getDebugMode()

bool Ogre::ForwardPlusBase::getDebugMode | ( |  | ) | const
| inline

## ◆ getDecalsEnabled()

bool Ogre::ForwardPlusBase::getDecalsEnabled | ( |  | ) | const
| inline

## ◆ getEnableVpls()

bool Ogre::ForwardPlusBase::getEnableVpls | ( |  | ) | const
| inline

## ◆ getFadeAttenuationRange()

bool Ogre::ForwardPlusBase::getFadeAttenuationRange | ( |  | ) | const
| inline

## ◆ getFineLightMaskGranularity()

bool Ogre::ForwardPlusBase::getFineLightMaskGranularity | ( |  | ) | const
| inline

## ◆ getForwardPlusMethod()

virtual ForwardPlusMethods Ogre::ForwardPlusBase::getForwardPlusMethod | ( |  | ) | const
| pure virtual

Implemented in Ogre::Forward3D, and Ogre::ForwardClustered.

## ◆ getGlobalLightListBuffer()

ReadOnlyBufferPacked * Ogre::ForwardPlusBase::getGlobalLightListBuffer | ( | const Camera * | camera | ) | const

Cache the return value as internally we perform an O(N) search.

## ◆ getGridBuffer()

TexBufferPacked * Ogre::ForwardPlusBase::getGridBuffer | ( | const Camera * | camera | ) | const

Cache the return value as internally we perform an O(N) search.

## ◆ isCacheDirty()

bool Ogre::ForwardPlusBase::isCacheDirty | ( | const Camera * | camera | ) | const

## ◆ setDebugMode()

void Ogre::ForwardPlusBase::setDebugMode | ( | bool | debugMode | ) |
| inline

Turns on visualization of light cell occupancy.

## ◆ setEnableVpls()

void Ogre::ForwardPlusBase::setEnableVpls | ( | bool | enable | ) |
| inline

## ◆ setFadeAttenuationRange()

void Ogre::ForwardPlusBase::setFadeAttenuationRange | ( | bool | fade | ) |
| inline

Attenuates the light by the attenuation range, causing smooth endings when at the end of the light range instead of a sudden sharp termination.

This isn't physically based (light's range is infinite), but looks very well, and makes more intuitive to manipulate a light by controlling its range instead of controlling its radius.

See also
  Light::setAttenuationBasedOnRadius and
  setAttenuation. And even when controlling the light by its radius, you don't have to worry so much about the threshold's value being accurate. It has a tendency to make lights dimmer though. That's the price to pay for this optimization and having more intuitive controls. Enabled by default.

In math: atten *= max( (attenRange - fDistance) / attenRange, 0.0f );

## ◆ setFineLightMaskGranularity()

void Ogre::ForwardPlusBase::setFineLightMaskGranularity | ( | bool | useFineGranularity | ) |
| inline

Toggles whether light masks will be obeyed per object & per light by doing: if( movableObject->getLightMask() & light->getLightMask() ) doLighting( movableObject light ); Note this toggle only affects Forward+ lights.

You may want to see HlmsPbs::setFineLightMaskGranularity for control over Forward lights. If you only need coarse granularity control over Forward+ lights, you may get higher performance via CompositorPassSceneDef::mLightVisibilityMask (light_visibility_mask keyword in scripts).

## ◆ setHlmsPassProperties()

virtual void Ogre::ForwardPlusBase::setHlmsPassProperties | ( | Hlms * | hlms | ) |
| virtual

Reimplemented in Ogre::Forward3D, and Ogre::ForwardClustered.

## Member Data Documentation

## ◆ MaxCubemapProbeRq

const uint32 Ogre::ForwardPlusBase::MaxCubemapProbeRq
| static

## ◆ MaxDecalRq

const uint32 Ogre::ForwardPlusBase::MaxDecalRq
| static

## ◆ MinCubemapProbeRq

const uint32 Ogre::ForwardPlusBase::MinCubemapProbeRq
| static

## ◆ MinDecalRq

const uint32 Ogre::ForwardPlusBase::MinDecalRq
| static

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

- OgreForwardPlusBase.h