SetSamplerState()
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
//
typedef enum _D3DSAMPLERSTATETYPE {
D3DSAMP_ADDRESSU = 1,
D3DSAMP_ADDRESSV = 2,
D3DSAMP_ADDRESSW = 3,
D3DSAMP_BORDERCOLOR = 4,
D3DSAMP_MAGFILTER = 5,
D3DSAMP_MINFILTER = 6,
D3DSAMP_MIPFILTER = 7,
D3DSAMP_MIPMAPLODBIAS = 8,
D3DSAMP_MAXMIPLEVEL = 9,
D3DSAMP_MAXANISOTROPY = 10,
D3DSAMP_SRGBTEXTURE = 11,
D3DSAMP_ELEMENTINDEX = 12,
D3DSAMP_DMAPOFFSET = 13,
D3DSAMP_FORCE_DWORD = 0x7fffffff
} D3DSAMPLERSTATETYPE;
Constants
-
D3DSAMP_ADDRESSU
-
Texture-address mode for the u coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.
-
D3DSAMP_ADDRESSV
-
Texture-address mode for the v coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.
-
D3DSAMP_ADDRESSW
-
Texture-address mode for the w coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS.
-
D3DSAMP_BORDERCOLOR
-
Border color or type D3DCOLOR. The default color is 0x00000000.
-
D3DSAMP_MAGFILTER
-
Magnification filter of type D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_POINT.
-
D3DSAMP_MINFILTER
-
Minification filter of type D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_POINT.
-
D3DSAMP_MIPFILTER
-
Mipmap filter to use during minification. See D3DTEXTUREFILTERTYPE. The default value is D3DTEXF_NONE.
-
D3DSAMP_MIPMAPLODBIAS
-
Mipmap level of detail (LOD) bias. The default value is zero.
-
D3DSAMP_MAXMIPLEVEL
-
LOD index of largest map to use. Values range from 0 to (n - 1) where 0 is the largest. The default value is zero.
-
D3DSAMP_MAXANISOTROPY
-
DWORD maximum anisotropy. The default value is 1.
-
D3DSAMP_SRGBTEXTURE
-
Gamma correction value. The default value is 0, which means gamma is 1.0 and no correction is required. Otherwise, this value means that the sampler should assume gamma of 2.2 on the content and convert it to linear (gamma 1.0) before presenting it to the pixel shader.
-
D3DSAMP_ELEMENTINDEX
-
When a multielement texture is assigned to the sampler, this indicates which element index to use. The default value is 0.
-
D3DSAMP_DMAPOFFSET
-
Vertex offset in the presampled displacement map. This is a constant used by the tessellator, its default value is 0.
-
D3DSAMP_FORCE_DWORD
-
This value forces a 32-bit enumeration.
:
SetSamplerState(0 , D3DSAMP_ADDRESSU , D3DTADDRESS_WRAP);
SetSamplerState(0 , D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP);
=================================================================
==============
DirectX
=================================================================
==============
SetSamplerState(0 , D3DSAMP_ADDRESSU , D3DTADDRESS_MIRROR);
SetSamplerState(0 , D3DSAMP_ADDRESSV, D3DTADDRESS_MIRROR);
=================================================================
==============
=================================================================
==============
SetSamplerState(0 , D3DSAMP_ADDRESSU , D3DTADDRESS_CLAMP);
SetSamplerState(0 , D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
=================================================================
==============
=================================================================
==============
SetSamplerState(0 , D3DSAMP_BORDERCOLOR , 0xffff0000); //
SetSamplerState(0 , D3DSAMP_ADDRESSU , D3DTADDRESS_BORDER);
SetSamplerState(0 , D3DSAMP_ADDRESSV, D3DTADDRESS_BORDER;
=================================================================
==============
=================================================================
==============
SetSamplerState(0 , D3DSAMP_ADDRESSU , D3DTADDRESS_MIRRORONCE);
SetSamplerState(0 , D3DSAMP_ADDRESSV, D3DTADDRESS_MIRRORONCE);
=================================================================
==============
DirectX
=================================================================
==============
SetRenderState(D3DRS_WRAP0 , D3DWRAP_U|D3DWRAP_V); // u v
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
조건자로 필터링프로그래밍에서 컬렉션이 있을 때 요구 사항을 충족하는 부분을 필터링하고 나머지는 버려야 하는 경우가 있습니다. 자세한 예는 환자 기록 목록이 있고 미성년 환자 목록을 가져오려는 경우입니다. 이 코드를 자바 파일에 복...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.