Prepare the texture sampler for monochrome convolution filtering on a single-color texture.
HRESULT SetConvolutionMonoKernel( UINT width, UINT height, float *rows, float *columns );
The width of the filter kernel; ranging from 1 - D3DCONVOLUTIONMONO_MAXWIDTH. The default value is 1.
The height of the filter kernel; ranging from 1 - D3DCONVOLUTIONMONO_MAXHEIGHT. The default value is 1.
An array of weights, one weight for each kernel sub-element in the width. This parameter must be NULL, which will set the weights equal to the default value.
An array of weights, one weight for each kernel sub-element in the height. This parameter must be NULL, which will set the weights equal to the default value.
If the method succeeds, the return value is D3D_OK.
This method is designed to filter a single color texture. A monochrome convolution filter is a 2D box filter with all of the weights set to 1.0; the filter kernel resolution ranges from 1 x 1 to 7 x 7. When monochrome texture filtering is set to a texture sampler and texture sampling is performed at location, then Direct3D performs convolution.
- The filter specified by this method is recorded in state blocks as a part of D3DSBT_PIXELSTATE.
- The only texture address mode supported is: D3DPTADDRESSCAPS_BORDER; the border color is always 0.
- This method is not supported for mipmaps.
- Using a non-monochrome texture with convolution filtering will generate a driver error.