Click or drag to resize
DigitalRuneUpsampleFilter Class
Upscales an input 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 UpsampleFilter : PostProcessor

The UpsampleFilter type exposes the following members.

Constructors
  NameDescription
Public methodUpsampleFilter
Initializes a new instance of the UpsampleFilter 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.
(Inherited from PostProcessor.)
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 methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyDefaultTargetFormat
Gets or sets the default target format. (This property is used by the PostProcessorChain).
(Inherited from PostProcessor.)
Public propertyDepthSensitivity
Bilateral Upsampling: Gets or sets the depth sensitivity.
Public propertyDepthThreshold
Nearest-Depth Upsampling: Gets or sets the depth threshold used for edge detection.
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 propertyMode
Gets or sets the mode that is used for upsampling the low-resolution image.
Public propertyName
Gets or sets the name of the post-processor.
(Inherited from PostProcessor.)
Public propertyRebuildZBuffer
Gets or sets a value indicating whether to rebuild the Z-buffer.
Top
Remarks

This post-processor reads the low-resolution SourceTexture and increases the resolution to match the RenderTarget.

The UpsampleFilter supports different modes (see property Mode). Point and Linear are basic upsampling modes that do not take the original geometry in account. Bilateraland NearestDepth are "edge-aware" modes that try to maintain the original geometry and prevent blurred edges. The "edge-aware" modes require that the depth buffer is set in the render context (see property GBuffer0) and the low-resolution copy of the depth buffer needs to be stored in renderContext.Data[RenderContextKey.DepthBufferHalf].

Optionally, a SceneTexture can be set in the RenderContext. In this case the input texture is combined (alpha-blended) to the scene texture and the combined result is output by the pixel shader.

Optionally, the property RebuildZBuffer can be set. In this case the depth information of the original scene is output together with the color information in the pixel shader.

See Also