Public Member Functions | |
virtual void MCCOMAPI | GetBufferNeeds (RenderFilterNeeds &needs, void *renderer)=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 |
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:
To implement your own post renderer, you should derive your class from TBasicPostRenderer which provides a default implementation for the methods of I3DExPostRenderer
To access an existing postRenderer, use I3DShPostRenderer.
virtual MCCOMErr MCCOMAPI I3DExPostRenderer::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.
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. |
Implemented in TBasicPostRenderer.
virtual MCCOMErr MCCOMAPI I3DExPostRenderer::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.
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 |
Implemented in TBasicPostRenderer.
virtual MCCOMErr MCCOMAPI I3DExPostRenderer::EndRender | ( | ) | [pure virtual] |
Called at the end of the rendering of an animation.
Implemented in TBasicPostRenderer.
virtual MCCOMErr MCCOMAPI I3DExPostRenderer::FinishDraw | ( | ) | [pure virtual] |
Called for clean up at the end of the postrendering (after DrawRect()).
Implemented in TBasicPostRenderer.
virtual void MCCOMAPI I3DExPostRenderer::GetBufferNeeds | ( | RenderFilterNeeds & | needs, | |
void * | renderer | |||
) | [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
needs | A bit field that identifies which GBuffers are necessary. The bits are set to 1 if the corresponding GBuffer should be filled. | |
renderer | Not used |
Implemented in TBasicPostRenderer.
virtual IShRasterLayer::ELayerMode MCCOMAPI I3DExPostRenderer::GetEffectCompositionMode | ( | ) | [pure virtual] |
Returns the effect compositing mode for multipass rendering. If it returns IShRasterLayer::kUnknownMode, the composition will be handled by the application, otherwise the compositedOutputTile should be correctly filled when the function DrawRect is called.
Implemented in TBasicPostRenderer.
virtual MCCOMErr MCCOMAPI I3DExPostRenderer::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.
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 |
Implemented in TBasicPostRenderer.
virtual void MCCOMAPI I3DExPostRenderer::SetRaytracer | ( | I3DExRaytracer * | raytracer | ) | [pure virtual] |
Sets the raytracer
raytracer | A pointer to a raytracer |
Implemented in TBasicPostRenderer.