OGRE-Next: Ogre::CompositorPassDef Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Ogre::CompositorPassDef Class Reference
Core » Effects

Interface to abstract all types of pass definitions (see CompositorPassType): More...

`#include <OgreCompositorPassDef.h>`

Inheritance diagram for Ogre::CompositorPassDef:
[legend]

## Classes
struct | UavDependency
struct | ViewportRect

## Public Types
typedef vector< UavDependency >::type | UavDependencyVec

## Public Member Functions
| CompositorPassDef (CompositorPassType passType, CompositorTargetDef *parentTargetDef)
virtual | ~CompositorPassDef ()
const CompositorTargetDef * | getParentTargetDef () const
uint32 | getRtIndex () const
CompositorPassType | getType () const
void | setAllClearColours (const ColourValue &clearValue)
void | setAllLoadActions (LoadAction::LoadAction loadAction)
void | setAllStoreActions (StoreAction::StoreAction storeAction)

## Public Attributes
ColourValue | mClearColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
float | mClearDepth
uint32 | mClearStencil
bool | mColourWrite
| When false will not really bind the RenderTarget for rendering and use a null colour buffer instead.
uint8 | mExecutionMask
IdStringVec | mExposedTextures
bool | mFlushCommandBuffers
| Whether to flush the command buffer at the end of the pass.
uint32 | mIdentifier
| Custom value in case there's a listener attached (to identify the pass)
bool | mIncludeOverlays
| TODO: Refactor OgreOverlay to remove this design atrocity.
LoadAction::LoadAction | mLoadActionColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
LoadAction::LoadAction | mLoadActionDepth
LoadAction::LoadAction | mLoadActionStencil
uint32 | mNumInitialPasses
| Number of times to perform the pass before stopping. -1 to never stop.
uint32 | mNumViewports
String | mProfilingId
bool | mReadOnlyDepth
bool | mReadOnlyStencil
bool | mShadowMapFullViewport
| Only used if mShadowMapIdx is valid (if pass is owned by Shadow Nodes).
uint32 | mShadowMapIdx
| Shadow map index it belongs to (only filled in passes owned by Shadow Nodes)
bool | mSkipLoadStoreSemantics
| Ignore mLoadAction*‍/mStoreAction*.
StoreAction::StoreAction | mStoreActionColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
StoreAction::StoreAction | mStoreActionDepth
StoreAction::StoreAction | mStoreActionStencil
UavDependencyVec | mUavDependencies
uint8 | mViewportModifierMask
ViewportRect | mVpRect [16]
| Viewport's region to draw.
bool | mWarnIfRtvWasFlushed
| Will issue a warning (by raising an exception) if Ogre is forced to flush the RenderTarget, which is very bad for performance on mobile, and can cause serious performance problems in Desktop if using MSAA, and also cause correctness problems (i.e.

## Detailed Description

Interface to abstract all types of pass definitions (see CompositorPassType):

- PASS_SCENE (see CompositorPassSceneDef)
- PASS_QUAD (see CompositorPassQuadDef)
- PASS_CLEAR (see CompositorPassClearDef)
- PASS_STENCIL (see CompositorPassStencilDef)
- PASS_DEPTHCOPY (see CompositorPassDepthCopy)
- PASS_UAV (see CompositorPassUavDef)
- PASS_COMPUTE (see CompositorPassComputeDef)
- PASS_SHADOWS (see CompositorPassShadowsDef)
- PASS_MIPMAP (see CompositorPassMipmapDef)

This class doesn't do much on its own. See the derived types for more information A definition is shared by all pass instantiations (i.e. Five CompositorPassScene can share the same CompositorPassSceneDef) and are assumed to remain const throughout their lifetime.

  Modifying a definition while there are active instantiations is undefined. Some implementations may see the change (eg. changing CompositorPassSceneDef::mFirstRQ) immediately while not see others (eg. changing CompositorPassSceneDef::mCameraName) Also crashes could happen depending on the changes being made.

## Member Typedef Documentation

## ◆ UavDependencyVec

typedef vector<UavDependency>::type Ogre::CompositorPassDef::UavDependencyVec

## Constructor & Destructor Documentation

## ◆ CompositorPassDef()

Ogre::CompositorPassDef::CompositorPassDef | ( | CompositorPassType | passType,
|  | CompositorTargetDef * | parentTargetDef )
| inline

References Ogre::ColourValue::Black, Ogre::LoadAction::Load, mClearColour, mClearDepth, mClearStencil, mColourWrite, mExecutionMask, mFlushCommandBuffers, mIdentifier, mIncludeOverlays, mLoadActionColour, mLoadActionDepth, mLoadActionStencil, mNumInitialPasses, mNumViewports, mReadOnlyDepth, mReadOnlyStencil, mShadowMapFullViewport, mShadowMapIdx, mSkipLoadStoreSemantics, mStoreActionColour, mStoreActionDepth, mStoreActionStencil, mViewportModifierMask, mWarnIfRtvWasFlushed, OGRE_MAX_MULTIPLE_RENDER_TARGETS, and Ogre::StoreAction::StoreOrResolve.

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), Ogre::CompositorPassComputeDef::CompositorPassComputeDef(), Ogre::CompositorPassDepthCopyDef::CompositorPassDepthCopyDef(), Ogre::CompositorPassIblSpecularDef::CompositorPassIblSpecularDef(), Ogre::CompositorPassMipmapDef::CompositorPassMipmapDef(), Ogre::CompositorPassQuadDef::CompositorPassQuadDef(), Ogre::CompositorPassSceneDef::CompositorPassSceneDef(), Ogre::CompositorPassUavDef::CompositorPassUavDef(), and Ogre::CompositorPassWarmUpDef::CompositorPassWarmUpDef().

## ◆ ~CompositorPassDef()

virtual Ogre::CompositorPassDef::~CompositorPassDef | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ getParentTargetDef()

const CompositorTargetDef * Ogre::CompositorPassDef::getParentTargetDef | ( |  | ) | const

## ◆ getRtIndex()

uint32 Ogre::CompositorPassDef::getRtIndex | ( |  | ) | const

## ◆ getType()

CompositorPassType Ogre::CompositorPassDef::getType | ( |  | ) | const
| inline

## ◆ setAllClearColours()

void Ogre::CompositorPassDef::setAllClearColours | ( | const ColourValue & | clearValue | ) |

## ◆ setAllLoadActions()

void Ogre::CompositorPassDef::setAllLoadActions | ( | LoadAction::LoadAction | loadAction | ) |

Referenced by Ogre::CompositorPassWarmUpDef::CompositorPassWarmUpDef().

## ◆ setAllStoreActions()

void Ogre::CompositorPassDef::setAllStoreActions | ( | StoreAction::StoreAction | storeAction | ) |

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), and Ogre::CompositorPassWarmUpDef::CompositorPassWarmUpDef().

## Member Data Documentation

## ◆ mClearColour

ColourValue Ogre::CompositorPassDef::mClearColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]

Referenced by CompositorPassDef().

## ◆ mClearDepth

float Ogre::CompositorPassDef::mClearDepth

Referenced by CompositorPassDef().

## ◆ mClearStencil

uint32 Ogre::CompositorPassDef::mClearStencil

Referenced by CompositorPassDef().

## ◆ mColourWrite

bool Ogre::CompositorPassDef::mColourWrite

When false will not really bind the RenderTarget for rendering and use a null colour buffer instead.

Useful for depth prepass, or if the RTT is actually an UAV. Some passes may ignore this setting (e.g. Clear passes)

Referenced by CompositorPassDef().

## ◆ mExecutionMask

uint8 Ogre::CompositorPassDef::mExecutionMask

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), and CompositorPassDef().

## ◆ mExposedTextures

IdStringVec Ogre::CompositorPassDef::mExposedTextures

## ◆ mFlushCommandBuffers

bool Ogre::CompositorPassDef::mFlushCommandBuffers

Whether to flush the command buffer at the end of the pass.

This can incur in a performance overhead (see OpenGL's glFlush and D3D11' ID3D11DeviceContext::Flush) for info. Usually you want to leave this off. However for VR applications that must meet VSync, profiling may show your workload benefits from submitting earlier so the GPU can start right away executing rendering commands.

The main reason to use this is in CPU-bound scenarios where the GPU starts too late after sitting idle.

Referenced by CompositorPassDef().

## ◆ mIdentifier

uint32 Ogre::CompositorPassDef::mIdentifier

Custom value in case there's a listener attached (to identify the pass)

Referenced by CompositorPassDef().

## ◆ mIncludeOverlays

bool Ogre::CompositorPassDef::mIncludeOverlays

TODO: Refactor OgreOverlay to remove this design atrocity.

A custom overlay pass is a better alternative (or just use their own RQ)

Referenced by CompositorPassDef(), and Ogre::CompositorPassSceneDef::CompositorPassSceneDef().

## ◆ mLoadActionColour

LoadAction::LoadAction Ogre::CompositorPassDef::mLoadActionColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), CompositorPassDef(), and Ogre::CompositorPassClearDef::setBuffersToClear().

## ◆ mLoadActionDepth

LoadAction::LoadAction Ogre::CompositorPassDef::mLoadActionDepth

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), CompositorPassDef(), and Ogre::CompositorPassClearDef::setBuffersToClear().

## ◆ mLoadActionStencil

LoadAction::LoadAction Ogre::CompositorPassDef::mLoadActionStencil

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), CompositorPassDef(), and Ogre::CompositorPassClearDef::setBuffersToClear().

## ◆ mNumInitialPasses

uint32 Ogre::CompositorPassDef::mNumInitialPasses

Number of times to perform the pass before stopping. -1 to never stop.

Referenced by CompositorPassDef().

## ◆ mNumViewports

uint32 Ogre::CompositorPassDef::mNumViewports

Referenced by CompositorPassDef().

## ◆ mProfilingId

String Ogre::CompositorPassDef::mProfilingId

## ◆ mReadOnlyDepth

bool Ogre::CompositorPassDef::mReadOnlyDepth

Referenced by CompositorPassDef(), Ogre::CompositorPassSceneDef::setUseDepthPrePass(), and Ogre::CompositorPassSceneDef::setUseRefractions().

## ◆ mReadOnlyStencil

bool Ogre::CompositorPassDef::mReadOnlyStencil

Referenced by CompositorPassDef(), Ogre::CompositorPassSceneDef::setUseDepthPrePass(), and Ogre::CompositorPassSceneDef::setUseRefractions().

## ◆ mShadowMapFullViewport

bool Ogre::CompositorPassDef::mShadowMapFullViewport

Only used if mShadowMapIdx is valid (if pass is owned by Shadow Nodes).

If true, we won't force the viewport to fit the region of the UV atlas on the texture, and respect mVp* settings instead.

Referenced by CompositorPassDef().

## ◆ mShadowMapIdx

uint32 Ogre::CompositorPassDef::mShadowMapIdx

Shadow map index it belongs to (only filled in passes owned by Shadow Nodes)

Referenced by CompositorPassDef().

## ◆ mSkipLoadStoreSemantics

bool Ogre::CompositorPassDef::mSkipLoadStoreSemantics

Ignore mLoadAction*‍/mStoreAction*.

Useful when doing multiple passes and you want to continue using the same pass semantics opened by a previous pass

Be careful with this setting. It can silently break a lot of stuff

Only valid for PASS_QUAD and PASS_SCENE

Referenced by CompositorPassDef().

## ◆ mStoreActionColour

StoreAction::StoreAction Ogre::CompositorPassDef::mStoreActionColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]

Referenced by CompositorPassDef().

## ◆ mStoreActionDepth

StoreAction::StoreAction Ogre::CompositorPassDef::mStoreActionDepth

Referenced by CompositorPassDef().

## ◆ mStoreActionStencil

StoreAction::StoreAction Ogre::CompositorPassDef::mStoreActionStencil

Referenced by CompositorPassDef().

## ◆ mUavDependencies

UavDependencyVec Ogre::CompositorPassDef::mUavDependencies

## ◆ mViewportModifierMask

uint8 Ogre::CompositorPassDef::mViewportModifierMask

Referenced by Ogre::CompositorPassClearDef::CompositorPassClearDef(), and CompositorPassDef().

## ◆ mVpRect

ViewportRect Ogre::CompositorPassDef::mVpRect[16]

Viewport's region to draw.

## ◆ mWarnIfRtvWasFlushed

bool Ogre::CompositorPassDef::mWarnIfRtvWasFlushed

Will issue a warning (by raising an exception) if Ogre is forced to flush the RenderTarget, which is very bad for performance on mobile, and can cause serious performance problems in Desktop if using MSAA, and also cause correctness problems (i.e.

bad rendering) if store action is StoreAction::Resolve.

Remarks
  Flushes are caused by splitting rendering to the same RenderTarget in multiple passes while rendering to a different RenderTarget in the middle. It's not always possible to avoid it, but if so, consider doing it.

  No warning will be issued if the RenderTargets getting flushed have their LoadAction set to LoadAction::Clear (or LoadAction::ClearOnTilers on tilers).

Referenced by CompositorPassDef().

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

- OgreCompositorPassDef.h