# I3DShPostRenderer Struct Reference
[Shell Interfaces]

Inheritance diagram for I3DShPostRenderer:

List of all members.

## Public Member Functions
virtual MCCOMErr MCCOMAPI | SetScene (I3DShScene *scene)=0
virtual MCCOMErr MCCOMAPI | GetBufferNeeds (RenderFilterNeeds &needs)=0
virtual MCCOMErr MCCOMAPI | PrepareDraw (IShRasterLayer *input, const TMCRect &bounds, IShChannel *buffers[], I3DShScene *scene, I3DShCamera *renderingCamera, const TBBox2D &uvBox, const TBBox2D &productionFrame)=0
virtual MCCOMErr MCCOMAPI | DrawRect (const TMCRect &outputRect, const TChannelDataBucket *outputTile[], const TChannelDataBucket *compositedOutputTile[], const TBBox2D &uvBox)=0
virtual MCCOMErr MCCOMAPI | FinishDraw ()=0
virtual MCCOMErr MCCOMAPI | BeginRender (MicroTick beginTime, MicroTick endTime, uint32 framePerSeconds, int32 nbrFrames, boolean isRenderMovie)=0
virtual MCCOMErr MCCOMAPI | EndRender ()=0
virtual void MCCOMAPI | SetRaytracer (I3DExRaytracer *raytracer)=0
virtual IShRasterLayer::ELayerMode MCCOMAPI | GetEffectCompositionMode ()=0

## Detailed Description

Post Renderers are instantiated at the end of the rendering to add a post processing effect to the image. They can use the information stored in GBuffers.

Post Renderers can be instantiated in two different ways:

- They can be added in the scene properties (Filter tab) if they apply globally to the whole scene.

- They can also be hidden (subFamily="Hidden") and associated with a particular datacomponent (see I3DExDataComponent) that will instantiate them when it is enabled. This allow for instance to have a per object effect (like the 3D Aura).

There are two interfaces to access postRenderer: The shell interface (I3DShPostRenderer) and the external interface (I3DExPostRenderer) . You can get one from the other using QueryInterface.

Whenever it is possible you should use the Shell interface (I3DShPostRenderer) to access the component because the Shell will make sure that the parameter map of the external component is valid. This is especially important if the component is animated. For more information on components see the Overview of the SDK.

See also:
  I3DShPostRenderer

## Member Function Documentation

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::BeginRender | ( | MicroTick | beginTime,
|  | MicroTick | endTime,
|  | uint32 | framePerSeconds,
|  | int32 | nbrFrames,
|  | boolean | isRenderMovie |
| ) |  |  | `[pure virtual]`

Called at the beginning of the rendering of an animation. This can be used if you want to create a Post Renderer that depends on previous frames.

Parameters:

  | beginTime | The time at which the rendering starts (in MicroTick)
  | endTime | The time at which the rendering ends (in MicroTick)
  | framePerSeconds | The number of frame per second
  | nbrFrames | The total number of frame that will be rendered.
  | isRenderMovie | True if an animation is being rendered.

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::DrawRect | ( | const TMCRect & | outputRect,
|  | const TChannelDataBucket * | outputTile[],
|  | const TChannelDataBucket * | compositedOutputTile[],
|  | const TBBox2D & | uvBox |
| ) |  |  | `[pure virtual]`

Called for each tile of the output image. This is where the actual rendering takes place.

Parameters:

  | outputRect | The Rectangle of the tile (in pixels)
  | outputTile | Pointers to pixel buckets (R,G,B,A) of the output tile.
  | compositedOutputTile | Pointers to the compisited pixel buckets (see GetEffectCompositionMode())
  | uvBox | The screen coordinates of the tile

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::EndRender | ( |  | ) | `[pure virtual]`

Called at the end of the rendering of an animation.

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::FinishDraw | ( |  | ) | `[pure virtual]`

Called for clean up at the end of the postrendering (after DrawRect()).

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::GetBufferNeeds | ( | RenderFilterNeeds & | needs | ) | `[pure virtual]`

Identifies which GBuffers are necessary to compute this post renderer. To find the various contants used for GBuffer check at the end of I3DExPostRenderer.h

Parameters:

  | needs | A bit field that identifies which GBuffers are necessary. The bits are set to 1 if the corresponding GBuffer should be filled.

virtual IShRasterLayer::ELayerMode MCCOMAPI I3DShPostRenderer::GetEffectCompositionMode | ( |  | ) | `[pure virtual]`

Returns the effect compositing mode for multipass rendering.

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::PrepareDraw | ( | IShRasterLayer * | input,
|  | const TMCRect & | bounds,
|  | IShChannel * | buffers[],
|  | I3DShScene * | scene,
|  | I3DShCamera * | renderingCamera,
|  | const TBBox2D & | uvBox,
|  | const TBBox2D & | productionFrame |
| ) |  |  | `[pure virtual]`

Called at the begginning of postrendering to initialise the postrenderer.

Parameters:

  | input | The color buffer of the image.
  | bounds | The image rectangle in pixels
  | buffers | The array of pointers to the GBuffers (The pointers are null if the corresponding buffer is not allocated)
  | scene | The scene being rendered
  | renderingCamera | The current renderingCamera
  | uvBox | screen Coordinates of the image to render
  | productionFrame | Screen coordinates of the production frame

virtual void MCCOMAPI I3DShPostRenderer::SetRaytracer | ( | I3DExRaytracer * | raytracer | ) | `[pure virtual]`

Sets the raytracer

Parameters:

  | raytracer | A pointer to a raytracer

virtual MCCOMErr MCCOMAPI I3DShPostRenderer::SetScene | ( | I3DShScene * | scene | ) | `[pure virtual]`

Sets the scene that is rendered.

Parameters:

  | scene | The scene that is rendered.

The documentation for this struct was generated from the following file:

- I3dShPostRenderer.h