|
| CompositorPassQuad (const CompositorPassQuadDef *definition, Camera *defaultCamera, CompositorNode *parentNode, const CompositorChannel &target, Real horizonalTexelOffset, Real verticalTexelOffset) |
|
virtual void | _placeBarriersAndEmulateUavExecution (BoundUav boundUavs[64], ResourceAccessMap &uavsAccess, ResourceLayoutMap &resourcesLayout) |
| Emulates the execution of a UAV to understand memory dependencies, and adds a memory barrier / resource transition if we need to.
|
|
void | _removeAllBarriers (void) |
|
void | addResourceTransition (ResourceLayoutMap::iterator currentLayout, ResourceLayout::Layout newLayout, uint32 readBarrierBits) |
|
virtual void | execute (const Camera *lodCamera) |
|
const CompositorPassDef * | getDefinition (void) const |
|
const CompositorNode * | getParentNode (void) const |
|
Pass * | getPass (void) |
| Don't make this const (useful for compile-time multithreading errors) Pointer can be null if using HLMS.
|
|
RenderTarget * | getRenderTarget (void) const |
|
const CompositorTexture & | getTargetTexture (void) const |
|
const CompositorTextureVec & | getTextureDependencies (void) const |
|
CompositorPassType | getType () const |
|
Viewport * | getViewport () const |
|
virtual void | notifyCleared (void) |
| @See CompositorNode::_notifyCleared
|
|
virtual void | notifyDestroyed (const CompositorChannel &channel) |
| @See CompositorNode::notifyDestroyed
|
|
virtual void | notifyDestroyed (const UavBufferPacked *buffer) |
|
virtual void | notifyRecreated (const CompositorChannel &oldChannel, const CompositorChannel &newChannel) |
| @See CompositorNode::notifyRecreated
|
|
virtual 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
|
|
void | profilingBegin (void) |
|
void | profilingEnd (void) |
|
void | resetNumPassesLeft (void) |
|
Implementation of CompositorPass This implementation will render a fullscreen triangle/quad to the RenderTarget using the parameters from definition (rectangle area, whether triangle or quad pass, whether to include frustum corners, etc)
- A fullscreen quad are two triangles that form a rectangle, which cover the entire screen. This is however an inefficient way of harnessing the GPU's power. Modern GPUs iterate a whole bounding rect that encloses each triangle (it's highly more parallelizable & scalable than the scanline algorithm used by older Voodoo cards in the 90's). That means we're wasting 50% of GPU reasources in pixels that aren't drawn.
- A much faster approach made famous by Emil Persson (see max area triangulation http://www.humus.name/index.php?page=News&ID=228) is to render a single oversized triangle that covers the entire screen, which has it's UV scaled up; so that when interpolated at screen position, it appears it goes from the range [0; 1) like a regular quad pass. The difference is that pixels that go past the viewport are much better clipped/earlied-out by the GPU than those that fall inside the viewport but outside the triangle (like the rectangle approach)
- This faster technique only works for passes that cover the entire screen. When the viewport is not 0 0 1 1; the CompositorPassQuad automatically switches to a fullscreen quad.
- IMPORTANT: The texel-to-pixel adjustment offset is included in the world matrix passed to the vertex shader. This differs from Ogre 1.x which tried to embed the offset into the vertices.
- IMPORTANT: When the viewport is not 0 0 1 1; the scale & position factors are passed through the world matrix. This behavior differs from Ogre 1.x
- Author
- Matias N. Goldberg
- Version
- 1.0