|
| CompositorShadowNode (IdType id, const CompositorShadowNodeDef *definition, CompositorWorkspace *workspace, RenderSystem *renderSys, TextureGpu *finalTarget) |
|
virtual | ~CompositorShadowNode () |
|
const CompositorPassVec & | _getPasses () const |
|
void | _notifyCleared (void) |
| Internal Use. More...
|
|
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. More...
|
|
bool | _shouldUpdateShadowMapIdx (uint32 shadowMapIdx) const |
|
void | _update (Camera *camera, const Camera *lodCamera, SceneManager *sceneManager) |
| Renders into the shadow map, executes passes. More...
|
|
void | _update (const Camera *lodCamera, SceneManager *sceneManager) |
| Calling this function every frame will cause us to execute all our passes (ie. More...
|
|
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) More...
|
|
void | connectExternalBuffer (UavBufferPacked *buffer, size_t inChannelA) |
| Connects (injects) an external buffer into the given channel. More...
|
|
void | connectExternalRT (TextureGpu *externalTexture, size_t inChannelA) |
| Connects (injects) an external RT into the given channel. More...
|
|
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) More...
|
|
void | createPasses (void) |
| Creates all passes based on our definition. More...
|
|
void | destroyAllPasses (void) |
|
virtual void | finalTargetResized01 (const TextureGpu *finalTarget) |
|
virtual void | finalTargetResized02 (const TextureGpu *finalTarget) |
|
const LightsBitSet & | getAffectedLightsBitSet (void) const |
|
const AxisAlignedBox & | getCastersBox (void) const |
| mCastersBox More...
|
|
const TextureGpuVec & | getContiguousShadowMapTex (void) const |
|
UavBufferPacked * | getDefinedBuffer (IdString bufferName) const |
| Returns the buffer pointer of a buffer based on it's name. More...
|
|
UavBufferPacked * | getDefinedBufferNoThrow (IdString bufferName) const |
|
TextureGpu * | getDefinedTexture (IdString textureName) const |
| Returns the texture pointer of a texture based on it's name & mrt index. More...
|
|
const CompositorShadowNodeDef * | getDefinition () const |
|
bool | getEnabled (void) const |
| Returns if this instance is enabled. setEnabled. More...
|
|
IdType | getId () const |
| Get the unique id of this object. More...
|
|
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. More...
|
|
const CompositorChannelVec & | getLocalTextures () const |
|
void | getMinMaxDepthRange (const Frustum *shadowMapCamera, Real &outMin, Real &outMax) const |
| Outputs the min & max depth range for the given camera. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
RenderSystem * | getRenderSystem (void) const |
|
const LightClosestArray & | getShadowCastingLights (void) const |
|
uint8 | getShadowMapLightTypeMask (uint32 shadowMapIdx) const |
| Do not call this if isShadowMapIdxActive == false or isShadowMapIdxInValidRange == false. More...
|
|
const Matrix4 & | getViewMatrix (size_t shadowMapIdx) const |
| Returns the texture view matrix for the given shadow map index. More...
|
|
Matrix4 | getViewProjectionMatrix (size_t shadowMapIdx) const |
| Returns the texture view projection matrix for the given shadow map index. More...
|
|
CompositorWorkspace * | getWorkspace (void) |
| Returns our parent workspace. More...
|
|
const CompositorWorkspace * | getWorkspace (void) const |
| Returns our parent workspace. More...
|
|
bool | isShadowMapIdxActive (uint32 shadowMapIdx) const |
| Returns true if the shadow map index is not active. More...
|
|
bool | isShadowMapIdxInValidRange (uint32 shadowMapIdx) const |
|
void | notifyDestroyed (TextureGpu *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. More...
|
|
void | notifyDestroyed (const UavBufferPacked *buffer) |
|
void | notifyRecreated (TextureGpu *channel) |
| Call this function when you're replacing the textures from oldChannel with the ones in newChannel. More...
|
|
void | notifyRecreated (const UavBufferPacked *oldBuffer, UavBufferPacked *newBuffer) |
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info More...
|
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new More...
|
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info More...
|
|
void * | operator new[] (size_t sz) |
|
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. More...
|
|
void | resetAllNumPassesLeft (void) |
| Resets the number of passes left for every pass (. More...
|
|
void | setEnabled (bool bEnabled) |
| Enables or disables all instances of this node. More...
|
|
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. More...
|
|
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. More...
|
|
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