博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Direct3D采样器声明--Direct3D Sampler States
阅读量:6647 次
发布时间:2019-06-25

本文共 1070 字,大约阅读时间需要 3 分钟。

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

     默认值

     Sampler State                          Default Value

     采样器声明                               默认数值

     * ADDRESSU                           D3DTADDRESS_WRAP

     * ADDRESSV                           D3DTADDRESS_WRAP
     * ADDRESSW                          D3DTADDRESS_WRAP
     * BORDERCOLOR                  0x00000000
     * MAGFILTER                          D3DTEXF_POINT
     * MINFILTER                            D3DTEXF_POINT
     * MIPFILTER                            D3DTEXF_NONE
     * MIPMAPLODBIAS                  0.0f
     * MAXMIPLEVEL                    

转载地址:http://oeuto.baihongyu.com/

你可能感兴趣的文章