Table of Contents

Enum TextureFilter

Namespace
Stride.Graphics
Assembly
Stride.dll

Identifies the filtering mode to use during Texture sampling.

[DataContract("TextureFilter")]
public enum TextureFilter
Extension Methods

Fields

Anisotropic = 85

Use anisotropic interpolation for minification, magnification, and mip-level sampling.

When viewing a surface at a shallow angle, the Texture is stretched according to the perspective. Point or linear interpolation sample in a circular area independent of the viewing angle, producing a blurry or smeared appearance.

Anisotropic filtering addresses this by sampling Textures differently depending on the angle of the surface relative to the viewer. Instead of assuming a circular sampling footprint (as in isotropic methods like bilinear filtering), it stretches the sampling region into an ellipse or more complex shapes that better fit the distorted projection of the Texture, and takes more samples along that direction, depending on the anisotropy level.

It also interacts with mipmapping, selecting and interpolating from the appropriate mipmap levels, to ensure that the correct Texture resolution is used, even when viewed at extreme angles.

ComparisonAnisotropic = 213

Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonLinear = 149

Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinLinearMagMipPoint = 144

Use linear interpolation for minification, and point sampling for magnification and mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinLinearMagPointMipLinear = 145

Use linear interpolation for minification, point sampling for magnification, and linear interpolation for mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinMagLinearMipPoint = 148

Use linear interpolation for minification and magnification, and point sampling for mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinMagPointMipLinear = 129

Use point sampling for minification and magnification, and linear interpolation for mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinPointMagLinearMipPoint = 132

Use point sampling for minification, linear interpolation for magnification, and point sampling for mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonMinPointMagMipLinear = 133

Use point sampling for minification, and linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

ComparisonPoint = 128

Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.

Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.

Comparison filters only work with textures that have the following formats: R32_Float_X8X24_Typeless, R32_Float, R24_UNorm_X8_Typeless, and R16_UNorm.

Linear = 21

Use linear interpolation for minification, magnification, and mip-level sampling.

Linear interpolation is slower than point sampling, but produces higher quality results. Two samples are taken across the sampling direction, and a linearly interpolated value is generated between those by blending them.

MinLinearMagMipPoint = 16

Use linear interpolation for minification, point sampling for magnification and mip-level sampling.

MinLinearMagPointMipLinear = 17

Use linear interpolation for minification, point sampling for magnification, and linear interpolation for mip-level sampling.

MinMagLinearMipPoint = 20

Use linear interpolation for minification and magnification, and point sampling for mip-level sampling.

MinMagPointMipLinear = 1

Use point sampling for minification and magnification, and linear interpolation for mip-level sampling.

MinPointMagLinearMipPoint = 4

Use point sampling for minification, linear interpolation for magnification, and point sampling for mip-level sampling.

MinPointMagMipLinear = 5

Use point sampling for minification, linear interpolation for magnification and mip-level sampling.

Point = 0

Use point sampling for minification, magnification, and mip-level sampling.

Point sampling is the fastest texture filtering method. It is also the lowest quality, because it just reads a single value and does not blend between texels.

Remarks

During texture sampling, one or more texels are read and combined (this is called filtering) to produce a single value.