|
| CompositorShadowNode (IdType id, const CompositorShadowNodeDef *definition, CompositorWorkspace *workspace, RenderSystem *renderSys, const RenderTarget *finalTarget) |
|
virtual | ~CompositorShadowNode () |
|
const CompositorChannel * | _getDefinedTexture (IdString textureName) const |
|
const CompositorPassVec & | _getPasses () const |
|
void | _notifyCleared (void) |
| Internal Use.
|
|
void | _placeBarriersAndEmulateUavExecution (BoundUav boundUavs[64], ResourceAccessMap &uavsAccess, ResourceLayoutMap &resourcesLayout) |
|
void | _removeAllBarriers (void) |
|
void | _setFinalTargetAsRenderTarget (ResourceLayoutMap::iterator finalTargetCurrentLayout) |
| Places a resource transition in our last pass to the given RenderTarget.
|
|
bool | _shouldUpdateShadowMapIdx (uint32 shadowMapIdx) const |
|
void | _update (Camera *camera, const Camera *lodCamera, SceneManager *sceneManager) |
| Renders into the shadow map, executes passes.
|
|
void | _update (const Camera *lodCamera, SceneManager *sceneManager) |
| Calling this function every frame will cause us to execute all our passes (ie.
|
|
bool | areAllInputsConnected () const |
|
void | connectBufferTo (size_t outChannelA, CompositorNode *nodeB, size_t inChannelB) |
| Connects this node (let's call it node 'A') to node 'B', mapping the output channel from A into the input channel from B (buffer version)
|
|
void | connectExternalBuffer (UavBufferPacked *buffer, size_t inChannelA) |
| Connects (injects) an external buffer into the given channel.
|
|
void | connectExternalRT (const CompositorChannel &externalTexture, size_t inChannelA) |
| Connects (injects) an external RT into the given channel.
|
|
void | connectTo (size_t outChannelA, CompositorNode *nodeB, size_t inChannelB) |
| Connects this node (let's call it node 'A') to node 'B', mapping the output channel from A into the input channel from B (texture version)
|
|
void | createPasses (void) |
| Creates all passes based on our definition.
|
|
virtual void | finalTargetResized (const RenderTarget *finalTarget) |
| Called by CompositorManager2 when (i.e.) the RenderWindow was resized, thus our RTs that depend on their resolution need to be recreated.
|
|
const LightsBitSet & | getAffectedLightsBitSet (void) const |
|
const AxisAlignedBox & | getCastersBox (void) const |
| @See mCastersBox
|
|
const TextureVec & | getContiguousShadowMapTex (void) const |
|
UavBufferPacked * | getDefinedBuffer (IdString bufferName) const |
| Returns the buffer pointer of a buffer based on it's name.
|
|
UavBufferPacked * | getDefinedBufferNoThrow (IdString bufferName) const |
|
TexturePtr | getDefinedTexture (IdString textureName, size_t mrtIndex) const |
| Returns the texture pointer of a texture based on it's name & mrt index.
|
|
const CompositorShadowNodeDef * | getDefinition () const |
|
bool | getEnabled (void) const |
| Returns if this instance is enabled. @See setEnabled.
|
|
IdType | getId () const |
| Get the unique id of this object.
|
|
uint32 | getIndexToContiguousShadowMapTex (size_t shadowMapIdx) const |
|
const CompositorChannelVec & | getInputChannel () const |
|
const Light * | getLightAssociatedWith (uint32 shadowMapIdx) const |
| Note: May return null if there is no such shadowMapIdx, or if there is no light that could be linked with that shadow map index.
|
|
const CompositorChannelVec & | getLocalTextures () const |
|
void | getMinMaxDepthRange (const Frustum *shadowMapCamera, Real &outMin, Real &outMax) const |
| Outputs the min & max depth range for the given camera.
|
|
void | getMinMaxDepthRange (size_t shadowMapIdx, Real &outMin, Real &outMax) const |
|
IdString | getName (void) const |
|
size_t | getNumActiveShadowCastingLights (void) const |
| The return value may change in the future, which happens when the number of lights changes to or from a value lower than the supported shadow casting lights by the definition.
|
|
size_t | getPassNumber (CompositorPass *pass) const |
|
const vector< Real >::type * | getPssmBlends (size_t shadowMapIdx) const |
| Returns a list of points with the blend band boundaries of the closest N-1 PSSM split in projection space for the given shadow map index.
|
|
const Real * | getPssmFade (size_t shadowMapIdx) const |
| Returns the fade point of the last PSSM split in projection space for the given shadow map index.
|
|
const vector< Real >::type * | getPssmSplits (size_t shadowMapIdx) const |
| Returns a list of points with the limits of each PSSM split in projection space for the given shadow map index.
|
|
RenderSystem * | getRenderSystem (void) const |
|
const LightClosestArray & | getShadowCastingLights (void) const |
|
uint8 | getShadowMapLightTypeMask (uint32 shadowMapIdx) const |
| Do not call this if isShadowMapIdxActive == false or isShadowMapIdxInValidRange == false.
|
|
const Matrix4 & | getViewMatrix (size_t shadowMapIdx) const |
| Returns the texture view matrix for the given shadow map index.
|
|
Matrix4 | getViewProjectionMatrix (size_t shadowMapIdx) const |
| Returns the texture view projection matrix for the given shadow map index.
|
|
CompositorWorkspace * | getWorkspace (void) |
| Returns our parent workspace.
|
|
const CompositorWorkspace * | getWorkspace (void) const |
| Returns our parent workspace.
|
|
bool | isShadowMapIdxActive (uint32 shadowMapIdx) const |
| Returns true if the shadow map index is not active.
|
|
bool | isShadowMapIdxInValidRange (uint32 shadowMapIdx) const |
|
void | notifyDestroyed (const CompositorChannel &channel) |
| Call this function when caller has destroyed a RenderTarget in which the callee may have a reference to that pointer, so that we can clean it up.
|
|
void | notifyDestroyed (const UavBufferPacked *buffer) |
|
void | notifyRecreated (const CompositorChannel &oldChannel, const CompositorChannel &newChannel) |
| Call this function when you're replacing the textures from oldChannel with the ones in newChannel.
|
|
void | notifyRecreated (const UavBufferPacked *oldBuffer, UavBufferPacked *newBuffer) |
|
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
|
|
bool | operator() (const IdObject &left, const IdObject &right) |
|
bool | operator() (const IdObject *left, const IdObject *right) |
|
virtual void | postInitializePass (CompositorPass *pass) |
| We derive so we can override the camera with ours.
|
|
void | resetAllNumPassesLeft (void) |
| Resets the number of passes left for every pass (.
|
|
void | setEnabled (bool bEnabled) |
| Enables or disables all instances of this node.
|
|
void | setLightFixedToShadowMap (size_t shadowMapIdx, Light *light) |
| Marks a shadow map as statically updated, and ties the given light to always use that shadow map.
|
|
const LightList * | setShadowMapsToPass (Renderable *rend, const Pass *pass, AutoParamDataSource *autoParamDataSource, size_t startLight) |
|
void | setStaticShadowMapDirty (size_t shadowMapIdx, bool includeLinked=true) |
| Tags a static shadow map as dirty, causing Ogre to update it on the next time this Shadow node gets executed.
|
|
Shadow Nodes are special nodes (not to be confused with.
- See also
- CompositorNode) that are only used for rendering shadow maps. Normal Compositor Nodes can share or own a ShadowNode. The ShadowNode will render the scene enough times to fill all shadow maps so the main scene pass can use them.
- ShadowNode are very flexible compared to Ogre 1.x; as they allow mixing multiple shadow camera setups for different lights.
- Shadow Nodes derive from nodes so that they can be used as regular nodes
- During a render with shadow mapping enabled, we render first the Shadow Node's pass, then render the regular scene. In the past there used to be an AABB enclosing all visible objects that receive shadows that was used for calculating the shadow maps. This forced Ogre 2.x to split rendering into two stages: _cullPhase01 & _renderPhase02. This is not needed anymore.
To summarize: a normal rendering flow with shadow map looks like this: shadowNode->setupShadowCamera( normal->getVisibleBoundsInfo() ); shadowNode->_cullPhase01(); shadowNode->_renderPhase02(); normal->_cullPhase01(); normal->_renderPhase02();
- On forward lighting passes, shadow mapping is handled in the following way: 1) Build a list of all lights visible by all cameras (SceneManager does this) 2) Traverse the list to get the closest lights to the current camera. These lights will cast shadows. 3) Build a list of the closest lights for each object (SceneManager does this) 4) Traverse this list and find those that are actually casting a shadow 5) Send to the GPU & engine the list in step 4, but shadow casting lights are put first, then sorted by proximity. See the comments inside the function setShadowMapsToPass for more information.
- Author
- Matias N. Goldberg
- Version
- 1.0