OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::ForwardClustered Class Reference

Implementation of Clustered Forward Shading. More...

#include <OgreForwardClustered.h>

+ Inheritance diagram for Ogre::ForwardClustered:

Public Member Functions

 ForwardClustered (uint32 width, uint32 height, uint32 numSlices, uint32 lightsPerCell, uint32 decalsPerCell, uint32 cubemapProbesPerCell, float minDistance, float maxDistance, SceneManager *sceneManager)
 
 ~ForwardClustered () override
 
void collectLights (Camera *camera) override
 
void execute (size_t threadId, size_t numThreads) override
 Overload this function to perform whatever you want. More...
 
void fillConstBufferData (Viewport *viewport, bool bRequiresTextureFlipping, uint32 renderTargetHeight, IdString shaderSyntax, bool instancedStereo, float *RESTRICT_ALIAS passBufferPtr) const override
 Fills 'passBufferPtr' with the necessary data for ForwardClustered rendering. More...
 
size_t getConstBufferSize () const override
 Returns the amount of bytes that fillConstBufferData is going to fill. More...
 
bool getDebugFrustum () const
 
uint32 getDecalsPerCell () const
 
ForwardPlusMethods getForwardPlusMethod () const override
 
bool getFreezeDebugFrustum () const
 
uint32 getHeight () const
 
uint32 getLightsPerCell () const
 
float getMaxDistance () const
 
float getMinDistance () const
 
uint32 getNumSlices () const
 
uint32 getWidth () const
 
void setDebugFrustum (bool bEnableDebugFrustumWireAabb)
 
void setFreezeDebugFrustum (bool freezeDebugFrustum)
 
void setHlmsPassProperties (Hlms *hlms) override
 
- Public Member Functions inherited from Ogre::ForwardPlusBase
 ForwardPlusBase (SceneManager *sceneManager, bool decalsEnabled, bool cubemapProbesEnabled)
 
virtual ~ForwardPlusBase ()
 
void _changeRenderSystem (RenderSystem *newRs)
 
void _releaseManualHardwareResources ()
 
bool getDebugMode () const
 
bool getDecalsEnabled () const
 
bool getEnableVpls () const
 
bool getFadeAttenuationRange () const
 
bool getFineLightMaskGranularity () const
 
ReadOnlyBufferPackedgetGlobalLightListBuffer (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 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...
 

Additional Inherited Members

- Public Types inherited from Ogre::ForwardPlusBase
typedef vector< CachedGridBuffer >::type CachedGridBufferVec
 
enum  ForwardPlusMethods { MethodForward3D , MethodForwardClustered , NumForwardPlusMethods }
 
- Static Public Attributes inherited from Ogre::ForwardPlusBase
static const uint32 MaxCubemapProbeRq
 
static const uint32 MaxDecalRq
 
static const uint32 MinCubemapProbeRq
 
static const uint32 MinDecalRq
 

Detailed Description

Implementation of Clustered Forward Shading.

Constructor & Destructor Documentation

◆ ForwardClustered()

Ogre::ForwardClustered::ForwardClustered ( uint32  width,
uint32  height,
uint32  numSlices,
uint32  lightsPerCell,
uint32  decalsPerCell,
uint32  cubemapProbesPerCell,
float  minDistance,
float  maxDistance,
SceneManager sceneManager 
)

◆ ~ForwardClustered()

Ogre::ForwardClustered::~ForwardClustered ( )
override

Member Function Documentation

◆ collectLights()

void Ogre::ForwardClustered::collectLights ( Camera camera)
overridevirtual

Implements Ogre::ForwardPlusBase.

◆ execute()

void Ogre::ForwardClustered::execute ( size_t  threadId,
size_t  numThreads 
)
overridevirtual

Overload this function to perform whatever you want.

It will be called from all worker threads at the same time.

Parameters
threadIdThe index of the thread it is being called from. An index is guaranteed to be in range [0; numThreads)
numThreadsNumber of total threads

Implements Ogre::UniformScalableTask.

◆ fillConstBufferData()

void Ogre::ForwardClustered::fillConstBufferData ( Viewport viewport,
bool  bRequiresTextureFlipping,
uint32  renderTargetHeight,
IdString  shaderSyntax,
bool  instancedStereo,
float *RESTRICT_ALIAS  passBufferPtr 
) const
overridevirtual

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

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

Implements Ogre::ForwardPlusBase.

◆ getConstBufferSize()

size_t Ogre::ForwardClustered::getConstBufferSize ( ) const
overridevirtual

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

Implements Ogre::ForwardPlusBase.

◆ getDebugFrustum()

bool Ogre::ForwardClustered::getDebugFrustum ( ) const

◆ getDecalsPerCell()

uint32 Ogre::ForwardClustered::getDecalsPerCell ( ) const
inline

◆ getForwardPlusMethod()

ForwardPlusMethods Ogre::ForwardClustered::getForwardPlusMethod ( ) const
inlineoverridevirtual

Implements Ogre::ForwardPlusBase.

◆ getFreezeDebugFrustum()

bool Ogre::ForwardClustered::getFreezeDebugFrustum ( ) const

◆ getHeight()

uint32 Ogre::ForwardClustered::getHeight ( ) const
inline

◆ getLightsPerCell()

uint32 Ogre::ForwardClustered::getLightsPerCell ( ) const
inline

◆ getMaxDistance()

float Ogre::ForwardClustered::getMaxDistance ( ) const
inline

◆ getMinDistance()

float Ogre::ForwardClustered::getMinDistance ( ) const
inline

◆ getNumSlices()

uint32 Ogre::ForwardClustered::getNumSlices ( ) const
inline

◆ getWidth()

uint32 Ogre::ForwardClustered::getWidth ( ) const
inline

◆ setDebugFrustum()

void Ogre::ForwardClustered::setDebugFrustum ( bool  bEnableDebugFrustumWireAabb)

◆ setFreezeDebugFrustum()

void Ogre::ForwardClustered::setFreezeDebugFrustum ( bool  freezeDebugFrustum)

◆ setHlmsPassProperties()

void Ogre::ForwardClustered::setHlmsPassProperties ( Hlms hlms)
overridevirtual

Reimplemented from Ogre::ForwardPlusBase.


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