Click or drag to resize
AB4D logo

RenderPostProcessingRenderingStep Class

RenderPostProcessing renders the post processing effects.
Inheritance Hierarchy

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

The RenderPostProcessingRenderingStep type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAdditionalBackBuffer
Public propertyAdditionalBackBufferDescription
Public propertyAdditionalRenderTargetView
Public propertyAdditionalShaderResourceView
Public propertyDestinationBackBuffer
Public propertyDestinationBackBufferDescription
Public propertyDestinationRenderTargetView
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
Public propertySourceBackBufferDescription
Public propertySourceRenderTargetView
Public propertySourceShaderResourceView
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).)
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