ColorCorrectionFilter Class |
Namespace: DigitalRune.Graphics.PostProcessing
The ColorCorrectionFilter type exposes the following members.
Name | Description | |
---|---|---|
ColorCorrectionFilter |
Initializes a new instance of the ColorCorrectionFilter class.
|
Name | Description | |
---|---|---|
ConvertLookupTexture |
Converts a 2D lookup texture to a 3D lookup texture.
| |
CreateLookupTexture2D(GraphicsDevice) |
Creates the default 2D lookup texture (no color transformations) with 16 entries per color
channel.
| |
CreateLookupTexture2D(GraphicsDevice, Int32) |
Creates the default 2D lookup texture (no color transformations) with the specified lookup
table size.
| |
Dispose |
Releases all resources used by an instance of the PostProcessor class.
(Inherited from PostProcessor.) | |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the PostProcessor class
and optionally releases the managed resources.
(Overrides PostProcessorDispose(Boolean).) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDisable |
Called when this post-processor is disabled.
(Inherited from PostProcessor.) | |
OnEnable |
Called when this post-processor is enabled.
(Inherited from PostProcessor.) | |
OnProcess |
Called when the post-processor should perform the post-processing.
(Overrides PostProcessorOnProcess(RenderContext).) | |
Process |
Performs the post-processing using the SourceTexture
and the RenderTarget specified in the render context.
(Inherited from PostProcessor.) | |
SetLookupTexture | Obsolete.
Sets the 3D lookup texture (LookupTextureA).
(Overwrites the existing 3D lookup texture.)
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DefaultTargetFormat |
Gets or sets the default target format.
(This property is used by the PostProcessorChain).
(Inherited from PostProcessor.) | |
Enabled |
Gets or sets a value indicating whether this post-processor is enabled.
(Inherited from PostProcessor.) | |
GraphicsService |
Gets the graphics service.
(Inherited from PostProcessor.) | |
InterpolationParameter |
Gets or sets the interpolation parameter for interpolating between the result of
LookupTextureA and LookupTextureB.
| |
IsDisposed |
Gets a value indicating whether this post-processor has been disposed of.
(Inherited from PostProcessor.) | |
LookupTexture | Obsolete.
Gets or sets the primary color lookup texture (a 3D texture). Same as
LookupTextureA.
| |
LookupTextureA |
Gets or sets the primary color lookup texture (a 3D texture).
| |
LookupTextureB |
Gets or sets a secondary, optional color lookup texture (a 3D texture).
| |
Name |
Gets or sets the name of the post-processor.
(Inherited from PostProcessor.) | |
Strength |
Gets or sets the strength of the effect.
|
This processor uses a 3D volume texture as a color lookup table to transform the colors of an image. LookupTextureA can be set directly. But it is usually easier to load it from a 2D texture. The method CreateLookupTexture2D(GraphicsDevice) creates a default 2D lookup texture (without any color transformations). Use ConvertLookupTexture(Texture2D) to convert a 2D lookup texture to a 3D lookup texture.
Workflow:
To define a color lookup texture, the artist can use following steps:
(Of course the color lookup texture can also be created in any other image editing tool.)
Interpolation between lookup textures:
Optionally, you can set a second lookup texture in LookupTextureB and use
InterpolationParameter to interpolate between both. This can be used to
gradually change the color correction when transitioning to a new zone in the game level. If
only LookupTextureA or LookupTextureB is set, then one lookup
texture is applied with the specified Strength and
InterpolationParameter is ignored.