util-box-filter
Perform a centered box filter (an average) - which means we might need to sample a half-texel off of either end of the filter, if the filter width is even (and it probably is)
Index
Functions
Functions
- BoxFilter
-
float4 BoxFilter( DECLARE_TEXTURE2D_AND_SAMPLER_PARAM( sourceTexture, samp), float2 invTextureSize, uint filterWidth, float2 texCoord, out float4 centerSample)Description
Perform a centered box filter.
Called by svideo-to-rgb and composite-to-svideo.
Parameters
sourceTexture, samp-
Type:
DECLARE_TEXTURE2D_AND_SAMPLER_PARAMA texture and sampler pair used to sample the texture to be filtered.
invTextureSize-
Type:
float2The inverse of the texture size, equivalent to
(1/sourceTexture.width, 1/sourceTexture.height) filterWidth-
Type:
uintThe width of the filter, in texels.
texCoord-
Type:
float2The texture coordinate for the center of the filter.
centerSample-
Type:
out float4Outputs the texture sample from the center point of the filter (at
texCoord).
Return Value
Type: float4The result of the box filter.