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

CompositorPassShadows This class enables force-updating multiple shadow nodes in batch in its own pass. More...

#include <OgreCompositorPassShadows.h>

+ Inheritance diagram for Ogre::CompositorPassShadows:

Public Member Functions

 CompositorPassShadows (const CompositorPassShadowsDef *definition, Camera *defaultCamera, CompositorNode *parentNode, const RenderTargetViewDef *rtv)
 ~CompositorPassShadows () override
void execute (const Camera *lodCamera) override
CameragetCullCamera () const
const FastArray< CompositorShadowNode * > & getShadowNodes () const
- Public Member Functions inherited from Ogre::CompositorPass
 CompositorPass (const CompositorPassDef *definition, CompositorNode *parentNode)
virtual ~CompositorPass ()
ResourceTransitionArray_getResourceTransitionsNonConst ()
virtual void analyzeBarriers (const bool bClearBarriers=true)
 Bakes all of the memory barriers / resource transition that will be needed before executing a GPU command like rendering, copying/blit or compute. More...
Vector2 getActualDimensions () const
const CompositorPassDefgetDefinition () const
const CompositorNodegetParentNode () const
RenderPassDescriptorgetRenderPassDesc () const
const ResourceTransitionArraygetResourceTransitions () const
const CompositorTextureVecgetTextureDependencies () const
CompositorPassType getType () const
Real getViewportAspectRatio (size_t vpIdx)
virtual void notifyCleared ()
virtual void notifyDestroyed (const UavBufferPacked *buffer)
virtual void notifyDestroyed (TextureGpu *channel)
virtual bool notifyRecreated (const TextureGpu *channel)
virtual void notifyRecreated (const UavBufferPacked *oldBuffer, UavBufferPacked *newBuffer)
void profilingBegin ()
void profilingEnd ()
virtual void resetNumPassesLeft ()

Detailed Description

CompositorPassShadows This class enables force-updating multiple shadow nodes in batch in its own pass.

This is useful because shadow nodes may "break" a render pass in 3:

- Normal rendering to RT
- Shadow node update
- Continue Normal rendering to the same RT

This is an unnecessary performance hit on mobile (TBDR) thus executing them earlier allows for a smooth:

- Shadow node update (all of them? Up to you)
- Normal rendering to RT

Don't forget to set shadow nodes to reuse in the pass scene passes or else you may overwrite them unnecessarily

Matias N. Goldberg

Constructor & Destructor Documentation

◆ CompositorPassShadows()

Ogre::CompositorPassShadows::CompositorPassShadows ( const CompositorPassShadowsDef definition,
Camera defaultCamera,
CompositorNode parentNode,
const RenderTargetViewDef rtv 

◆ ~CompositorPassShadows()

Ogre::CompositorPassShadows::~CompositorPassShadows ( )

Member Function Documentation

◆ execute()

void Ogre::CompositorPassShadows::execute ( const Camera lodCamera)

Implements Ogre::CompositorPass.

◆ getCullCamera()

Camera* Ogre::CompositorPassShadows::getCullCamera ( ) const

◆ getShadowNodes()

const FastArray<CompositorShadowNode *>& Ogre::CompositorPassShadows::getShadowNodes ( ) const

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