Click or drag to resize
DigitalRuneLuminanceFilter Class
Computes the minimum, average and maximum luminance of a texture.
Inheritance Hierarchy

Namespace: DigitalRune.Graphics.PostProcessing
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class LuminanceFilter : PostProcessor

The LuminanceFilter type exposes the following members.

Constructors
  NameDescription
Public methodLuminanceFilter
Initializes a new instance of the LuminanceFilter class.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by an instance of the PostProcessor class.
(Inherited from PostProcessor.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by an instance of the PostProcessor class and optionally releases the managed resources.
(Inherited from PostProcessor.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnDisable
Called when this post-processor is disabled.
(Overrides PostProcessorOnDisable.)
Protected methodOnEnable
Called when this post-processor is enabled.
(Inherited from PostProcessor.)
Protected methodOnProcess
Called when the post-processor should perform the post-processing.
(Overrides PostProcessorOnProcess(RenderContext).)
Public methodProcess
Performs the post-processing using the SourceTexture and the RenderTarget specified in the render context.
(Inherited from PostProcessor.)
Public methodReset Obsolete.
Resets this luminance adaption.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAdaptionSpeed
Gets or sets the adaption speed of the eye.
Public propertyDefaultTargetFormat
Gets or sets the default target format. (This property is used by the PostProcessorChain).
(Inherited from PostProcessor.)
Public propertyEnabled
Gets or sets a value indicating whether this post-processor is enabled.
(Inherited from PostProcessor.)
Public propertyGraphicsService
Gets the graphics service.
(Inherited from PostProcessor.)
Public propertyIsDisposed
Gets a value indicating whether this post-processor has been disposed of.
(Inherited from PostProcessor.)
Public propertyName
Gets or sets the name of the post-processor.
(Inherited from PostProcessor.)
Public propertyUseAdaption
Gets or sets a value indicating whether dynamic eye adaption should be used.
Public propertyUseGeometricMean
Gets or sets a value indicating whether the average luminance is computed using the geometric mean.
Top
Remarks

The render target should be a 1 x 1 texture with 3 floating-point channels (e.g. HalfVector4). The luminance info is stored in this order: (minimum, average, maximum). That means, the minimum luminance is stored in the "red" channel, and so on.

This post-processor stores luminance information of a frame for use in the next frame. The information is stored with the currently active camera node. When there is a cut in the scene (i.e. a new level is loaded or the view changes significantly), the method InvalidateViewDependentData of the camera node needs to be called to reset the luminance information. Further, this post-processor expects that it is called once per frame for a certain camera node. It might not work as expected if it is called several times per frame (e.g. to process different views using the same camera).

See Also