OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::ForwardPlusBase Class Referenceabstract

ForwardPlusBase. More...

#include <OgreForwardPlusBase.h>

+ Inheritance diagram for Ogre::ForwardPlusBase:

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)
 
virtual void collectLights (Camera *camera)=0
 
virtual void fillConstBufferData (Viewport *viewport, TextureGpu *renderTarget, IdString shaderSyntax, bool instancedStereo, float *RESTRICT_ALIAS passBufferPtr) const =0
 Fills 'passBufferPtr' with the necessary data for ForwardPlusBase rendering. More...
 
virtual size_t getConstBufferSize (void) const =0
 Returns the amount of bytes that fillConstBufferData is going to fill. More...
 
bool getDebugMode (void) const
 
bool getDecalsEnabled (void) const
 
bool getEnableVpls (void) const
 
bool getFadeAttenuationRange (void) const
 
bool getFineLightMaskGranularity (void) const
 
virtual ForwardPlusMethods getForwardPlusMethod (void) const =0
 
TexBufferPackedgetGlobalLightListBuffer (const Camera *camera) const
 Cache the return value as internally we perform an O(N) search. More...
 
TexBufferPackedgetGridBuffer (const Camera *camera) const
 Cache the return value as internally we perform an O(N) search. More...
 
bool isCacheDirty (const Camera *camera) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
void setDebugMode (bool debugMode)
 Turns on visualization of light cell occupancy. More...
 
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. More...
 
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. More...
 
virtual void setHlmsPassProperties (Hlms *hlms)
 

Static Public Attributes

static const size_t MaxCubemapProbeRq
 
static const size_t MaxDecalRq
 
static const size_t MinCubemapProbeRq
 
static const size_t MinDecalRq
 

Detailed Description

Member Typedef Documentation

◆ CachedGridBufferVec

Member Enumeration Documentation

◆ 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)

◆ collectLights()

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

◆ fillConstBufferData()

virtual void Ogre::ForwardPlusBase::fillConstBufferData ( Viewport viewport,
TextureGpu renderTarget,
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::ForwardClustered, and Ogre::Forward3D.

◆ getConstBufferSize()

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

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

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

◆ getDebugMode()

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

◆ getDecalsEnabled()

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

◆ getEnableVpls()

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

◆ getFadeAttenuationRange()

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

◆ getFineLightMaskGranularity()

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

◆ getForwardPlusMethod()

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

◆ getGlobalLightListBuffer()

TexBufferPacked* 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

◆ 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,
void *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [2/3]

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

◆ 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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

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

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

◆ 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::ForwardClustered, and Ogre::Forward3D.

Member Data Documentation

◆ MaxCubemapProbeRq

const size_t Ogre::ForwardPlusBase::MaxCubemapProbeRq
static

◆ MaxDecalRq

const size_t Ogre::ForwardPlusBase::MaxDecalRq
static

◆ MinCubemapProbeRq

const size_t Ogre::ForwardPlusBase::MinCubemapProbeRq
static

◆ MinDecalRq

const size_t Ogre::ForwardPlusBase::MinDecalRq
static

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