|
| CompositorNode (IdType id, IdString name, const CompositorNodeDef *definition, CompositorWorkspace *workspace, RenderSystem *renderSys, TextureGpu *finalTarget) |
| The Id must be unique across all engine so we can create unique named textures. More...
|
|
virtual | ~CompositorNode () |
|
const CompositorPassVec & | _getPasses () const |
|
void | _notifyCleared () |
| Internal Use. 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 () |
| Creates all passes based on our definition. More...
|
|
void | destroyAllPasses () |
|
virtual void | finalTargetResized01 (const TextureGpu *finalTarget) |
| Called by CompositorManager2 when (i.e.) the RenderWindow was resized, thus our RTs that depend on their resolution need to be recreated. More...
|
|
virtual void | finalTargetResized02 (const TextureGpu *finalTarget) |
|
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 CompositorNodeDef * | getDefinition () const |
|
bool | getEnabled () const |
| Returns if this instance is enabled. @See setEnabled. More...
|
|
IdType | getId () const |
| Get the unique id of this object. More...
|
|
const CompositorChannelVec & | getInputChannel () const |
|
const CompositorChannelVec & | getLocalTextures () const |
|
IdString | getName () const |
|
size_t | getPassNumber (CompositorPass *pass) const |
|
RenderSystem * | getRenderSystem () const |
|
CompositorWorkspace * | getWorkspace () |
| Returns our parent workspace. More...
|
|
const CompositorWorkspace * | getWorkspace () const |
| Returns our parent workspace. More...
|
|
void | notifyDestroyed (const UavBufferPacked *buffer) |
|
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 | notifyRecreated (const UavBufferPacked *oldBuffer, UavBufferPacked *newBuffer) |
|
void | notifyRecreated (TextureGpu *channel) |
| Call this function when you're replacing the textures from oldChannel with the ones in newChannel. More...
|
|
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 More...
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new More...
|
|
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 More...
|
|
bool | operator() (const IdObject &left, const IdObject &right) |
|
bool | operator() (const IdObject *left, const IdObject *right) |
|
void | resetAllNumPassesLeft () |
| Resets the number of passes left for every pass (. More...
|
|
void | setEnabled (bool bEnabled) |
| Enables or disables all instances of this node. More...
|
|
Compositor nodes are the core subject of compositing.
This is an instantiation. All const, shared parameters are in the definition (CompositorNodeDef) and we assume they don't change throughout the lifetime of our instance.
- The textures in mLocalTextures are managed by us and we're responsible for freeing them when they're no longer needed.
- Before nodes can be used, they have to be connected between each other, followed by a call to routeOutputs() Connections must be done in a very specific order, so let the manager take care of solving the dependencies. Basically the problem is that if the chain is like this: A -> B -> C; if we connect node B to C first, then there's a chance of giving null pointers to C instead of the valid ones that belong to A.
- To solve this problem, we first start with nodes that have no input, and then continue with those who have all of their input set; then repeat until there are no nodes to be processed. If there's still nodes with input left open; then those nodes can't be activated and the workspace is invalid.
- No Node can be valid if it has disconnected input channels left. Nodes can have no input because they either use passes that don't need it (eg. scene pass) or use global textures as means for sharing their work Similarly, Nodes may have no output because they use global textures.
- Nodes with feedback loops are not supported and may or may not work. A feedback loop is when A's output is used in B, B to C, then C is plugged back into A.
- It's possible to assign the same output to two different input channels, though it could work very unintuitively... (because two textures that may be intended to be hard copies are actually sharing the same memory)
- Author
- Matias N. Goldberg
- Version
- 1.0