# PostEffectPipeline class

Namespace: [Rhino.Render.PostEffects](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.render.posteffects.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class PostEffectPipeline : IDisposable, IProgress<int>, IPostEffects
```

This object provides a way for post effects to access the frame buffer channels from a rendering and create new channels containing post-processed information which can be passed to the next post effect in the chain. Consider a simple post effect that just modifies the red component of a rendering.It will call GetChannel() to get the red channel as its input, and it will call NewChannel() to get a new red channel for its output. It will then read the input channel, do calculations and write to the output channel.When finished, it will call Commit() passing the new channel.Because both channels have the same identifier, this will replace the old channel with the new one so that subsequent post effects in the chain will use the new channel instead of the original.Note that this will only replace the channel used by the pipeline.The original channel will still exist in the frame buffer.This system allows any post effect to access any number of channels for reading and create any number of new channels which may or may not replace existing channels depending on the channel id.The final stage (convert to 8-bit) operates on the channels left in the pipeline by the post effect chain to produce the final 32-bit RGBA image in a dib. It is also possible for a post effect to create and use any number of 'scratch' channels.If a post effect needs a temporary pixel buffer for some intermediate results, it can call NewChannel() with a custom (random) id. Once it is finished with this scratch channel, it can call Discard() on it.

## Finalizer

- [~PostEffectPipeline](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/finalize.md)

## Properties

- [GPUAllowed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/gpuallowed.md): Post effect authors should check that GPU use is allowed before using the GPU in a post effect.
- [IsRendering](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/isrendering.md): IsRendering
- [RenderingId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/renderingid.md): Return a UUID that uniquely identifies the rendering being processed.

## Methods

- [Dimensions](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/dimensions.md): Get the dimensions of the frame buffer. All channels in the frame buffer have the same dimensions.
- [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/dispose.md)
- [Execute](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/execute.md): Execute the pipeline. This executes all the post effects in order. Only this rectangle need be modified by the post effects.
- [ExecutionOrder](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/executionorder.md): Returns a list of the post effects to be executed by this pipeline in order.
- [GetChannelForRead](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/getchannelforread.md): Get a channel for reading. A post effect will use this to get channel data as input to its process. Output will be written to new channel(s). \see GetChannelForWrite() This method returns the current state of the channel at this stage in the pipeline. If the first post effect calls this, it will get the actual frame buffer channel. Subsequent post effects will get the data left behind by the previous post effect. A post effect calls GetChannelForRead() to get its input and GetChannelForWrite() to get the object to which it will write its output. Even when the same channel id is specified, these are separate, unconnected objects.
- [GetChannelForWrite](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/getchannelforwrite.md): Get a channel for writing. A post effect will use this to get channel(s) to write the output of its processing to. Input will usually come from existing channels, although a post effect is free to read its own output channels if needed. See GetChannelForRead() You are allowed to create one new channel with the same identifier as an existing channel, in which case IChannel::Commit() will replace the existing channel with the new one in the pipeline.
- [GetEndTimeInMilliseconds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/getendtimeinmilliseconds.md): Get the end time of the rendering expressed in milliseconds since some unspecified epoch. Do not make assumptions about what the epoch is; it might be different on different platforms.
- [GetMaxLuminance](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/getmaxluminance.md): Get the max luminance in the rendering.
- [GetStartTimeInMilliseconds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/getstarttimeinmilliseconds.md): Get the start time of the rendering expressed in milliseconds since some unspecified epoch. Do not make assumptions about what the epoch is; it might be different on different platforms.
- [IPostEffects.GetPostEffects](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/rhino-render-posteffects-iposteffects-getposteffects.md)
- [IPostEffects.PostEffectFromId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/rhino-render-posteffects-iposteffects-posteffectfromid.md): Return a pointer to the specified post effect or null if not found.
- [SetStartTimeInMilliseconds](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/setstarttimeinmilliseconds.md): Set the start time of the rendering in milliseconds since some unspecified epoch.
- [IProgress<int>.Report](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/system-iprogress-system-int32-report.md): Post effects should call this during execution to report progress. A good strategy is to call this once per pixel row (or several rows). If the function returns \e false, your post effect should exit its pixel loop as the user has requested that the operation be canceled.
- [ThreadEngine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.posteffects.posteffectpipeline/threadengine.md): Get the post effect thread engine.
