Click or drag to resize
AB4D logo

RenderPostProcessingRenderingStep Class

RenderPostProcessing renders the post processing effects.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXDisposableDXResource
      Ab3d.DirectXDXSceneResource
        Ab3d.DirectXRenderingStepBase
          Ab3d.DirectXRenderPostProcessingRenderingStep

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class RenderPostProcessingRenderingStep : RenderingStepBase

The RenderPostProcessingRenderingStep type exposes the following members.

Constructors
 NameDescription
Public methodRenderPostProcessingRenderingStep(String, String) Initializes a new instance of the RenderPostProcessingRenderingStep class.
Public methodRenderPostProcessingRenderingStep(String, IListPostProcessBase, String) Initializes a new instance of the RenderPostProcessingRenderingStep class.
Top
Properties
 NameDescription
Public propertyAdditionalBackBuffer Gets an additional BackBuffer that is used when more than one post process is rendered. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertyAdditionalBackBufferDescription Gets a Description of the AdditionalBackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertyAdditionalRenderTargetView Gets a RenderTargetView for the AdditionalBackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertyAdditionalShaderResourceView Gets a ShaderResourceView for the AdditionalBackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertyDestinationBackBuffer Gets a destination BackBuffer. This value can be set with the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) or InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) methods.
Public propertyDestinationBackBufferDescription Gets a Description of the DestinationBackBuffer. This value can be set with the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) or InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) methods.
Public propertyDestinationRenderTargetView Gets a RenderTargetView for the DestinationBackBuffer. This value can be set with the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) or InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) methods.
Public propertyPostProcesses Gets or sets the post processes that will be rendered by this RenderPostProcessingRenderingStep.
Public propertyRestoreOriginalRenderTargets When true the render targets that were used before starting post processes are restored (this may require additional copying of back buffers). When false (by default) then new render targets (without MSAA) and bound without depth stencil buffer may be set after post processes are executed.
Public propertySourceBackBuffer Gets a source BackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertySourceBackBufferDescription Gets a Description of the sourceBackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertySourceRenderTargetView Gets a RenderTargetView for the SourceBackBuffer. This value can be set with the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method.
Public propertySourceShaderResourceView Gets a ShaderResourceView for the SourceBackBuffer. This value can be set with the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) or InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) methods.
Public propertySuperSamplingCount Gets the super-sampling count of the buffers used for processing steps.
Top
Methods
 NameDescription
Public methodClearBackBuffers Clears all set back buffers
Public methodInitializeResourcesForMultiplePostProcesses Initializes resources for rendering multiple PostProcesses. To render multiple post processes we need additional BackBuffer that is used as intermediate buffer.
Public methodInitializeResourcesForSinglePostProcess Initializes resources for rendering one PostProcess. Rendering one post process required much less resources then rendering multiple post processes.
Public methodSaveExecutionTimeStatistics SaveExecutionTimeStatistics is called when we are collecting statistics. The implementation of the method should save or add the elapsedMilliseconds to the corresponding property in the RenderingStatistics class.
(Overrides RenderingStepBaseSaveExecutionTimeStatistics(Double, RenderingStatistics))
Public methodToString Returns a string that represents the current object.
(Overrides RenderingStepBaseToString)
Top
Remarks

RenderPostProcessing renders the post processing effects that are defined in the PostProcesses list.

Before using the RenderPostProcessingRenderingStep, the PostProcesses list must be set to the list of post processes. Also the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) or the InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method must be called to set the resources required to run the post processes.

The PostProcesses list and the resources are usually automatically set in the PreparePostProcessingRenderingStep that sets the resources based on the PostProcesses list on the DXScene object.

The RenderPostProcessingRenderingStep can be also used without PreparePostProcessingRenderingStep. In this case the resources must be manually set.

When rendering only one post process, the InitializeResourcesForSinglePostProcess(ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) can be called. This method requires only sourceShaderResourceView, destinationBackBuffer, destinationBackBufferDescription and destinationRenderTargetView. In this case the sourceShaderResourceView is rendered directly to the destinationBackBuffer.

When having more than one post process the RenderPostProcessingRenderingStep much more resources that must be initialized with InitializeResourcesForMultiplePostProcesses(Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, ShaderResourceView, Texture2D, Texture2DDescription, RenderTargetView, Int32) method. This method can be also used for only one post process.

The first post process will use SourceShaderResourceView and will render to AdditionalRenderTargetView (from source buffer to additional buffer). Than AdditionalShaderResourceView will be used as source and the next post process will render to SourceRenderTargetView (from additional buffer to source buffer). Than the source and destination will change after each post process. Except last post process that is always rendered to DestinationRenderTargetView.

See Also