Set an array of sampler states to the pixel shader pipeline stage.
public:
void PSSetSamplers(
UINT StartSlot,
UINT NumSamplers,
ID3D11SamplerState * const *ppSamplers
)
StartSlot
Type: UINT
[in] Index into the device’s zero-based array to begin setting samplers to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).
NumSamplers
Type: UINT
[in] Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot).
ppSamplers
Type: ID3D11SamplerState * const *
[in, optional] Pointer to an array of sampler-state interfaces (see ID3D11SamplerState). See Remarks.
Any sampler may be set to NULL; this invokes the default state, which is defined to be the following.
| State | Default Value |
|---|---|
| Filter | D3D11_FILTER_MIN_MAG_MIP_LINEAR |
| AddressU | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressV | D3D11_TEXTURE_ADDRESS_CLAMP |
| AddressW | D3D11_TEXTURE_ADDRESS_CLAMP |
| MipLODBias | 0 |
| MaxAnisotropy | 1 |
| ComparisonFunc | D3D11_COMPARISON_NEVER |
| BorderColor[0] | 1.0f |
| BorderColor[1] | 1.0f |
| BorderColor[2] | 1.0f |
| BorderColor[3] | 1.0f |
| MinLOD | -FLT_MAX |
| MaxLOD | FLT_MAX |
The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).