Separable |
public abstract class SeparableKernelPostProcess : SimplePixelShaderPostProcess
The SeparableKernelPostProcess type exposes the following members.
Name | Description | |
---|---|---|
SeparableKernelPostProcess(Int32) | Initializes a new instance of the SeparableKernelPostProcess class. | |
SeparableKernelPostProcess(Boolean, Int32) | Initializes a new instance of the SeparableKernelPostProcess class. |
Name | Description | |
---|---|---|
FilterSize | Gets the size of the filter - number of pixels that are read to get the color produces by this post-process. | |
IsVerticalPass | Gets a boolean that specifies if vertical rendering pass is applied. If false than horizontal pass is applied. This value is set in constructor. Note that in order to render this post process fully, it needs to run in two passes - once as vertical and once as horizontal post process. | |
TextureSize | Gets or sets the size of the texture. |
Name | Description | |
---|---|---|
Render |
Render renders the post process with using the sourceShaderResourceView as the source texture.
It rendered the output to the CurrentRenderTargetView defined in the renderingContext.
(Overrides SimplePixelShaderPostProcessRender(RenderingContext, ShaderResourceView)) |
Name | Description | |
---|---|---|
MaxFilterSize | MaxFilterSize defines the maximum filter size that is supported by this post-process. |
SeparableKernelPostProcess applies horizontal or vertical gaussian blur post process. It uses array of offsets and weights to define how the pixels are processed.
Offsets define how far from the texture coordinate we sample pixel. Weights define how much weight this pixel has in the final color.
The following pixel shader is used for this post process:
float4 output = (float4)0.0f; for (int i = 0; i < 15; i++) output += gTexture.Sample(gSampler, psIn.textCoord + gOffsets[i]) * gWeights[i]; return output;