OGRE 2.3.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::CompositorPassSceneDef Class Reference

#include <OgreCompositorPassSceneDef.h>

Inheritance diagram for Ogre::CompositorPassSceneDef:

Public Types

typedef vector< UavDependency >::type UavDependencyVec

Public Member Functions

 CompositorPassSceneDef (CompositorTargetDef *parentTargetDef)
const CompositorTargetDefgetParentTargetDef (void) const
uint32 getRtIndex (void) const
CompositorPassType getType () const
void operator delete (void *ptr)
void operator delete (void *ptr, const char *, int, const char *)
void operator delete (void *ptr, void *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr, const char *, int, const char *)
void * operator new (size_t sz)
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz)
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void setAllClearColours (const ColourValue &clearValue)
void setAllLoadActions (LoadAction::LoadAction loadAction)
void setAllStoreActions (StoreAction::StoreAction storeAction)
void setLightVisibilityMask (uint32 visibilityMask)
void setUseDepthPrePass (const IdStringVec &textureName, IdString depthTextureName, IdString ssrTexture)
void setUseRefractions (IdString depthTextureName, IdString refractionsTexture)
void setVisibilityMask (uint32 visibilityMask)

Public Attributes

bool mBakeLightingOnly
 When mUvBakingSet is set, tells whether we should bake the whole render result or just the lighting intensity, in order to create a lightmap.
bool mCameraCubemapReorient
 When true, the camera will be rotated 90°, -90° or 180° depending on the value of mRtIndex and then restored to its original rotation after we're done.
IdString mCameraName
 When empty, uses the default camera.
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.
IdString mCullCameraName
 When empty, it implies mCameraName == mCullCameraName.
IdString mDepthTextureNoMsaa
bool mEnableForwardPlus
 Enable ForwardPlus during the pass (if Forward3D or ForwardClustered systems were created).
uint8 mExecutionMask
IdStringVec mExposedTextures
uint8 mFirstRQ
 First Render Queue ID to render. Inclusive.
bool mFlushCommandBuffers
 Whether to flush the command buffer at the end of the pass.
bool mFlushCommandBuffersAfterShadowNode
 Same as CompositorPassDef::mFlushCommandBuffers, but executed after the shadow node Note you may end up flushing twice if the shadow node also has flushing of its own.
bool mGenNormalsGBuf
 Generate Normals for a GBuffer in RTV output 1, This flag is ignored mPrePassMode if mPrePassMode != PrePassNone.
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.
bool mInstancedStereo
 When true, will render in instanced stereo mode, thus outputting left & right eyes at the same time.
uint8 mLastRQ
 Last Render Queue ID to render. Not inclusive.
uint32 mLightVisibilityMask
 Used by Forward+ to determine which lights should be used (via Light::setVisibilityFlags).
LoadAction::LoadAction mLoadActionColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
LoadAction::LoadAction mLoadActionDepth
LoadAction::LoadAction mLoadActionStencil
Real mLodBias
 Multiplier to the Lod value.
IdString mLodCameraName
 When empty, it implies mCameraName == mLodCameraName; except for shadow nodes.
String mMaterialScheme
 The material scheme used for this pass.
uint32 mNumInitialPasses
 Number of times to perform the pass before stopping. -1 to never stop.
uint32 mNumViewports
IdString mPrePassDepthTexture
PrePassMode mPrePassMode
 This is a depth pre-pass.
IdString mPrePassSsrTexture
IdStringVec mPrePassTexture
 Only used if mPrePassMode == PrePassUse.
String mProfilingId
bool mReadOnlyDepth
bool mReadOnlyStencil
IdString mRefractionsTexture
bool mReuseCullData
 When true, the frustum culling is skipped in this pass.
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).
IdString mShadowNode
ShadowNodeRecalculation mShadowNodeRecalculation
bool mSkipLoadStoreSemantics
 Ignore mLoadAction*‍/mStoreAction*.
StoreAction::StoreAction mStoreActionColour [OGRE_MAX_MULTIPLE_RENDER_TARGETS]
StoreAction::StoreAction mStoreActionDepth
StoreAction::StoreAction mStoreActionStencil
UavDependencyVec mUavDependencies
bool mUpdateLodLists
 When true, which Lod index is current will be updated.
Vector2 mUvBakingOffset
 When mUvBakingSet is enabled, this defines the UV offset (in pixels).
uint8 mUvBakingSet
 Used for baking lightmaps and similar stuff.
uint8 mViewportModifierMask
uint32 mVisibilityMask
 Viewport's visibility mask while rendering our pass.
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.

Member Typedef Documentation

◆ UavDependencyVec

Constructor & Destructor Documentation

◆ CompositorPassSceneDef()

Member Function Documentation

◆ getParentTargetDef()

const CompositorTargetDef * Ogre::CompositorPassDef::getParentTargetDef ( void ) const
inherited

◆ getRtIndex()

uint32 Ogre::CompositorPassDef::getRtIndex ( void ) const
inherited

◆ getType()

CompositorPassType Ogre::CompositorPassDef::getType ( ) const
inlineinherited

◆ operator delete() [1/3]

void Ogre::AllocatedObject< ResourceAllocPolicy >::operator delete ( void * ptr)
inlineinherited

◆ operator delete() [2/3]

void Ogre::AllocatedObject< ResourceAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inlineinherited

◆ operator delete() [3/3]

void Ogre::AllocatedObject< ResourceAllocPolicy >::operator delete ( void * ptr,
void *  )
inlineinherited

◆ operator delete[]() [1/2]

void Ogre::AllocatedObject< ResourceAllocPolicy >::operator delete[] ( void * ptr)
inlineinherited

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

void Ogre::AllocatedObject< ResourceAllocPolicy >::operator delete[] ( void * ptr,
const char * ,
int ,
const char *  )
inlineinherited

◆ operator new() [1/3]

void * Ogre::AllocatedObject< ResourceAllocPolicy >::operator new ( size_t sz)
inlineinherited

◆ operator new() [2/3]

void * Ogre::AllocatedObject< ResourceAllocPolicy >::operator new ( size_t sz,
const char * file,
int line,
const char * func )
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

void * Ogre::AllocatedObject< ResourceAllocPolicy >::operator new ( size_t sz,
void * ptr )
inlineinherited

placement operator new

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

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

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

void * Ogre::AllocatedObject< ResourceAllocPolicy >::operator new[] ( size_t sz,
const char * file,
int line,
const char * func )
inlineinherited

array operator new, with debug line info

◆ setAllClearColours()

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

◆ setAllLoadActions()

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

◆ setAllStoreActions()

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

◆ setLightVisibilityMask()

void Ogre::CompositorPassSceneDef::setLightVisibilityMask ( uint32 visibilityMask)
inline

◆ setUseDepthPrePass()

void Ogre::CompositorPassSceneDef::setUseDepthPrePass ( const IdStringVec & textureName,
IdString depthTextureName,
IdString ssrTexture )
inline

◆ setUseRefractions()

void Ogre::CompositorPassSceneDef::setUseRefractions ( IdString depthTextureName,
IdString refractionsTexture )
inline

◆ setVisibilityMask()

void Ogre::CompositorPassSceneDef::setVisibilityMask ( uint32 visibilityMask)
inline

Member Data Documentation

◆ mBakeLightingOnly

bool Ogre::CompositorPassSceneDef::mBakeLightingOnly

When mUvBakingSet is set, tells whether we should bake the whole render result or just the lighting intensity, in order to create a lightmap.

Typically, when baking with this setting, it's because you're going to use this texture with HlmsPbsDatablock as an emissive map and calling HlmsPbsDatablock::setUseEmissiveAsLightmap with true.

Referenced by CompositorPassSceneDef().

◆ mCameraCubemapReorient

bool Ogre::CompositorPassSceneDef::mCameraCubemapReorient

When true, the camera will be rotated 90°, -90° or 180° depending on the value of mRtIndex and then restored to its original rotation after we're done.

Referenced by CompositorPassSceneDef().

◆ mCameraName

IdString Ogre::CompositorPassSceneDef::mCameraName

When empty, uses the default camera.

◆ mClearColour

ColourValue Ogre::CompositorPassDef::mClearColour[OGRE_MAX_MULTIPLE_RENDER_TARGETS]
inherited

Referenced by CompositorPassDef().

◆ mClearDepth

float Ogre::CompositorPassDef::mClearDepth
inherited

Referenced by CompositorPassDef().

◆ mClearStencil

uint32 Ogre::CompositorPassDef::mClearStencil
inherited

Referenced by CompositorPassDef().

◆ mColourWrite

bool Ogre::CompositorPassDef::mColourWrite
inherited

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().

◆ mCullCameraName

IdString Ogre::CompositorPassSceneDef::mCullCameraName

When empty, it implies mCameraName == mCullCameraName.

◆ mDepthTextureNoMsaa

IdString Ogre::CompositorPassSceneDef::mDepthTextureNoMsaa

Referenced by setUseRefractions().

◆ mEnableForwardPlus

bool Ogre::CompositorPassSceneDef::mEnableForwardPlus

Enable ForwardPlus during the pass (if Forward3D or ForwardClustered systems were created).

Disabling optimizes performance when you don't need it.

Referenced by CompositorPassSceneDef().

◆ mExecutionMask

uint8 Ogre::CompositorPassDef::mExecutionMask
inherited

◆ mExposedTextures

IdStringVec Ogre::CompositorPassDef::mExposedTextures
inherited

◆ mFirstRQ

uint8 Ogre::CompositorPassSceneDef::mFirstRQ

First Render Queue ID to render. Inclusive.

Referenced by CompositorPassSceneDef().

◆ mFlushCommandBuffers

bool Ogre::CompositorPassDef::mFlushCommandBuffers
inherited

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().

◆ mFlushCommandBuffersAfterShadowNode

bool Ogre::CompositorPassSceneDef::mFlushCommandBuffersAfterShadowNode

Same as CompositorPassDef::mFlushCommandBuffers, but executed after the shadow node Note you may end up flushing twice if the shadow node also has flushing of its own.

Does not do anything if mShadowNodeRecalculation is set to SHADOW_NODE_REUSE (whether explicitly or automatically determined)

Referenced by CompositorPassSceneDef().

◆ mGenNormalsGBuf

bool Ogre::CompositorPassSceneDef::mGenNormalsGBuf

Generate Normals for a GBuffer in RTV output 1, This flag is ignored mPrePassMode if mPrePassMode != PrePassNone.

Referenced by CompositorPassSceneDef().

◆ mIdentifier

uint32 Ogre::CompositorPassDef::mIdentifier
inherited

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

Referenced by CompositorPassDef().

◆ mIncludeOverlays

bool Ogre::CompositorPassDef::mIncludeOverlays
inherited

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().

◆ mInstancedStereo

bool Ogre::CompositorPassSceneDef::mInstancedStereo

When true, will render in instanced stereo mode, thus outputting left & right eyes at the same time.

Referenced by CompositorPassSceneDef().

◆ mLastRQ

uint8 Ogre::CompositorPassSceneDef::mLastRQ

Last Render Queue ID to render. Not inclusive.

Referenced by CompositorPassSceneDef().

◆ mLightVisibilityMask

uint32 Ogre::CompositorPassSceneDef::mLightVisibilityMask

Used by Forward+ to determine which lights should be used (via Light::setVisibilityFlags).

Referenced by CompositorPassSceneDef(), and setLightVisibilityMask().

◆ mLoadActionColour

◆ mLoadActionDepth

◆ mLoadActionStencil

◆ mLodBias

Real Ogre::CompositorPassSceneDef::mLodBias

Multiplier to the Lod value.

What it means depends on the technique. You'll probably want to avoid setting it directly and rather use LodStrategy::transformBias

See also
LodStrategy::transformBias

Referenced by CompositorPassSceneDef().

◆ mLodCameraName

IdString Ogre::CompositorPassSceneDef::mLodCameraName

When empty, it implies mCameraName == mLodCameraName; except for shadow nodes.

For shadow nodes, when empty, it will use the receiver's lod camera.

◆ mMaterialScheme

String Ogre::CompositorPassSceneDef::mMaterialScheme

The material scheme used for this pass.

If no material scheme is set then it will use the default scheme

Referenced by CompositorPassSceneDef().

◆ mNumInitialPasses

uint32 Ogre::CompositorPassDef::mNumInitialPasses
inherited

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

Referenced by CompositorPassDef().

◆ mNumViewports

uint32 Ogre::CompositorPassDef::mNumViewports
inherited

Referenced by CompositorPassDef().

◆ mPrePassDepthTexture

IdString Ogre::CompositorPassSceneDef::mPrePassDepthTexture

Referenced by setUseDepthPrePass().

◆ mPrePassMode

PrePassMode Ogre::CompositorPassSceneDef::mPrePassMode

This is a depth pre-pass.

Note: Implementations may write to colour too for hybrid deferred & forward rendering. If you modify this, you probably want to modify mReadOnlyDepth & mReadOnlyStencil too

Referenced by CompositorPassSceneDef(), and setUseDepthPrePass().

◆ mPrePassSsrTexture

IdString Ogre::CompositorPassSceneDef::mPrePassSsrTexture

Referenced by setUseDepthPrePass().

◆ mPrePassTexture

IdStringVec Ogre::CompositorPassSceneDef::mPrePassTexture

Only used if mPrePassMode == PrePassUse.

Referenced by setUseDepthPrePass().

◆ mProfilingId

String Ogre::CompositorPassDef::mProfilingId
inherited

◆ mReadOnlyDepth

bool Ogre::CompositorPassDef::mReadOnlyDepth
inherited

◆ mReadOnlyStencil

bool Ogre::CompositorPassDef::mReadOnlyStencil
inherited

◆ mRefractionsTexture

IdString Ogre::CompositorPassSceneDef::mRefractionsTexture

Referenced by setUseRefractions().

◆ mReuseCullData

bool Ogre::CompositorPassSceneDef::mReuseCullData

When true, the frustum culling is skipped in this pass.

To cull objects, data from the most recent frustum culling execution are used.

Referenced by CompositorPassSceneDef().

◆ mShadowMapFullViewport

bool Ogre::CompositorPassDef::mShadowMapFullViewport
inherited

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
inherited

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

Referenced by CompositorPassDef().

◆ mShadowNode

IdString Ogre::CompositorPassSceneDef::mShadowNode

◆ mShadowNodeRecalculation

ShadowNodeRecalculation Ogre::CompositorPassSceneDef::mShadowNodeRecalculation

Referenced by CompositorPassSceneDef().

◆ mSkipLoadStoreSemantics

bool Ogre::CompositorPassDef::mSkipLoadStoreSemantics
inherited

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]
inherited

Referenced by CompositorPassDef().

◆ mStoreActionDepth

StoreAction::StoreAction Ogre::CompositorPassDef::mStoreActionDepth
inherited

Referenced by CompositorPassDef().

◆ mStoreActionStencil

StoreAction::StoreAction Ogre::CompositorPassDef::mStoreActionStencil
inherited

Referenced by CompositorPassDef().

◆ mUavDependencies

UavDependencyVec Ogre::CompositorPassDef::mUavDependencies
inherited

◆ mUpdateLodLists

bool Ogre::CompositorPassSceneDef::mUpdateLodLists

When true, which Lod index is current will be updated.

Reasons to set this to false:

  1. You don't use LOD (i.e. you're GPU bottleneck). Setting to false helps CPU.
  2. LODs have been calculated in a previous pass. This happens if previous pass(es) all used the same lod camera and all RenderQueue IDs this pass will use have been rendered already and updated their lod lists.
    Remarks
    Automatically set to false for shadow nodes that leave mLodCameraName empty

Referenced by CompositorPassSceneDef().

◆ mUvBakingOffset

Vector2 Ogre::CompositorPassSceneDef::mUvBakingOffset

When mUvBakingSet is enabled, this defines the UV offset (in pixels).

Without conservative rasterization, the baking won't render on pixels that are being partially touched by the triangle.

This causes severe artifacts when the baked result is used (background colour of the texture leaks into the triangle).

Without conservative rasterization, a sound solution is to render multiple times with pixel (or subpixel) offsets in order to add some padding around the borders of each triangle in the lightmap.

MSAA can also be used instead, but certain types of baking (e.g. GBuffer baking) don't work well because the MSAA sample locations are not in the center.

See https://ndotl.wordpress.com/2018/08/29/baking-artifact-free-lightmaps/

Referenced by CompositorPassSceneDef().

◆ mUvBakingSet

uint8 Ogre::CompositorPassSceneDef::mUvBakingSet

Used for baking lightmaps and similar stuff.

When set to 0xFF it is disabled. Otherwise, the selected UV set will be used to bake the texture with the render results. If the mesh doesn't have such UV, then the max UV will be used. If the mesh doesn't have UVs, it is up to the Hlms implementation what to do (probably raise an exception)

Referenced by CompositorPassSceneDef().

◆ mViewportModifierMask

uint8 Ogre::CompositorPassDef::mViewportModifierMask
inherited

◆ mVisibilityMask

uint32 Ogre::CompositorPassSceneDef::mVisibilityMask

Viewport's visibility mask while rendering our pass.

Referenced by CompositorPassSceneDef(), and setVisibilityMask().

◆ mVpRect

ViewportRect Ogre::CompositorPassDef::mVpRect[16]
inherited

Viewport's region to draw.

◆ mWarnIfRtvWasFlushed

bool Ogre::CompositorPassDef::mWarnIfRtvWasFlushed
inherited

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: