Plug-in Entry Points

Assuming some basic understanding of the rendering framework and the basic constructs as they are exposed in the API, the remainder of this document concentrates on the entry points exposed in the rendering pipeline.

Currently there are six main entry points which serve the following purposes:

  1. Geometry Override: Allows a plug-in to define custom geometric data streams to be used to draw a plug-in DAG object.
  2. Shader Override: Allows for custom shading to be performed. This is provides, roughly speaking, the equivalent functionality of the legacy hardware shader plug-in interface.
  3. Shading Node Override Allows a plug-in to define a hardware shader fragment for use in drawing a software shading node in the viewport.
  4. Draw Override: Allows full control over all drawing of a plug-in DAG object. This level of control is similar to the legacy plug-in locator or plug-in shape drawing. This is only a drawing override.
  5. Sub-scene Override: Allows a plug-in to efficiently define a large number of render items needed to draw a single DAG object.
  6. Render Loop Override: Allows custom render loops to be created, which override the internal render loop. This is a more formalized way to perform multi-pass rendering.

The following diagram is a basic breakdown of where these entry points reside. Without going into too much detail, it shows at which phase of the pipeline an entry point resides, with the obvious exception of the render loop override which uses or refines the pipeline.

Figure 34: Geometry overrides interact at the Update Phase of the pipeline as they serve as geometry providers to update render items to be sent down the pipeline. Shader overrides and draw overrides interact at the Draw Phase of the pipeline to control how things are drawn. For simplicity, sub-scene overrides and shading node overrides are not shown; however, they both interact during the Update Phase.

Note the usage of the term attach. These entry points strive to be as unobtrusive as possible by adding or attaching additional functionality to existing nodes, as opposed to introducing new node types. The main attachment points are for plug-in DAG objects, plug-in shading nodes and a renderer. The last refers to the concept of a “renderer” rather than specific renderer objects.

In this framework, a plug-in can be attached to any entry point without having to rely on other plug-ins in other entry points. However, if one or more entry points have plug-ins attached, then they work together in a more cohesive manner than any older interfaces. For example, in older APIs, the plug-in geometry mechanism (roughly a geometry override) and the plug-in shader mechanism (roughly a shader override) do not work together.