typedef enum D3D11_FILTER {
D3D11_FILTER_MIN_MAG_MIP_POINT = 0x00000000,
D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x00000001,
D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000004,
D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x00000005,
D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x00000010,
D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000011,
D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x00000014,
D3D11_FILTER_MIN_MAG_MIP_LINEAR = 0x00000015,
D3D11_FILTER_ANISOTROPIC = 0x00000055,
D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x00000080,
D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x00000081,
D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x00000084,
D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x00000085,
D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x00000090,
D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x00000091,
D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x00000094,
D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x00000095,
D3D11_FILTER_COMPARISON_ANISOTROPIC = 0x000000d5
} D3D11_FILTER;
这个枚举定义了多种过滤器选项,其中包括不同的纹理采样方式,如点采样、线性采样、各向异性采样等。选择适当的过滤器可以影响纹理采样的质量和性能。
例如,D3D11_FILTER_MIN_MAG_MIP_POINT 表示点采样,而 D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT 表示在最小化过滤方面使用线性采样,在放大过滤和 mip 映射方面使用点采样。
了解和选择合适的过滤器对于纹理的外观和渲染效果非常重要。
转载请注明出处:http://www.zyzy.cn/article/detail/25750/Win32 API/D3d11.h/D3D11_FILTER