I don't understand this error. The full output being :
The Pixel Shader unit expects a Sampler configured for default filtering to be set at Slot 0, but the sampler bound at this slot is configured for comparison filtering.
Here is how I create the sampler state.
// Skybox sampler description
D3D11_SAMPLER_DESC skyboxSamplerDesc;
ZeroMemory(&skyboxSamplerDesc, sizeof(D3D11_SAMPLER_DESC));
skyboxSamplerDesc.Filter = D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT;
skyboxSamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
skyboxSamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
skyboxSamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
skyboxSamplerDesc.MipLODBias = 0.0f;
skyboxSamplerDesc.MaxAnisotropy = 16;
skyboxSamplerDesc.ComparisonFunc = D3D11_COMPARISON_EQUAL;
skyboxSamplerDesc.MinLOD = 0;
skyboxSamplerDesc.MaxLOD = D3D11_FLOAT32_MAX;
// Create the skybox texture sampler state
hr = g_d3dDevice->CreateSamplerState(&skyboxSamplerDesc, &g_SkyboxSamplerState);
if (FAILED(hr)) return false;
The bindings.
ID3D11SamplerState* samplerStates[2];
samplerStates[0] = g_SkyboxSamplerState;
samplerStates[1] = g_PixelDepthSamplerState;
g_d3dDeviceContext->PSSetSamplers(0, 2, samplerStates);
HLSL side.
SamplerState sbSamplerState : register (s0) {
Filter = MIN_MAG_LINEAR_MIP_POINT;
AddressU = CLAMP;
AddressV = CLAMP;
AddressW = CLAMP;
ComparisonFunc = EQUAL;
};