Direct3D采样器声明--Direct3D Sampler States
HRESULT SetSamplerState(
DWORD Sampler, //指定纹理采样属性的纹理层ID(0~7)
D3DSAMPLERSTATETYPE Type, //纹理过滤类型
DWORD Value //设置纹理采样属性值
);
第二个参数D3DSAMPLERSTATETYPE Type取值:
D3DSAMP_MAGFILTER //处理放大过滤
D3DSAMP_MINFILTER //处理缩小过滤
D3DSAMP_MIPFILTER //多纹理过滤
D3DSAMP_MIPMAPLODBIAS //多级纹理级数偏移值,初始值为0
D3DSAMP_MAXMIPLEVEL //最大多纹理级别,初始值为0
D3DSAMP_MAXANISOTROPY //各向异性,初始为1
第三个参数Value取值:
D3DTEXF_NONE //不使用特殊的采样方式
D3DTEXF_POINT //最近点采样
D3DTEXF_LINEAR //线性纹理采样
D3DTEXF_ANISOTROPIC //各向异性纹理采样
Default Values